DEV Community

Cover image for What Are Core Web Vitals and Why Do They Matter?
Razen Creations LLC
Razen Creations LLC

Posted on

What Are Core Web Vitals and Why Do They Matter?

Core Web Vitals are three Google metrics that grade real-world page experience: Largest Contentful Paint (LCP) for load speed, Interaction to Next Paint (INP) for responsiveness, and Cumulative Layout Shift (CLS) for visual stability. Developers care because these scores are shaped directly by code decisions like unoptimized images, long JavaScript tasks, and missing layout dimensions. Good thresholds are LCP under 2.5s, INP under 200ms, and CLS under 0.1.

You ship a feature, run a quick Lighthouse check, and everything looks fine. Then Search Console flags your production URLs as "poor" on Core Web Vitals, and nobody on the team can immediately explain why. Sound familiar?

That gap between lab results and field data is exactly why Core Web Vitals trip up so many engineering teams. This post breaks down what the three metrics actually measure, the code patterns that quietly wreck them, and the fixes worth prioritizing this sprint.

What do LCP, INP, and CLS actually measure?

Core Web Vitals aren't synthetic benchmarks. Google pulls them from real Chrome sessions via the Chrome User Experience Report (CrUX), scored at the 75th percentile over a rolling 28-day window. That distinction matters for developers: a clean Lighthouse run in DevTools doesn't guarantee a passing field score, because your users aren't testing on a fast machine with an empty cache.

Largest Contentful Paint (LCP) tracks how long the largest visible element, usually a hero image or heading block, takes to render. Passing threshold: 2.5 seconds or less.

Interaction to Next Paint (INP) measures the delay between any user interaction (click, tap, keypress) and the next visual update. INP replaced First Input Delay (FID) as the official responsiveness metric in March 2024, and Chrome dropped FID entirely that September. The shift matters because FID only captured the first interaction on a page, while INP samples every interaction across a session, making it a much less forgiving metric. Passing threshold: 200 milliseconds or less.

Cumulative Layout Shift (CLS) quantifies unexpected visual movement, like a late-loading ad pushing content down right as a user goes to tap something. Passing threshold: 0.1 or less.

Why should developers care about Core Web Vitals?

Core Web Vitals function as a confirmed, if secondary, Google ranking signal. They won't outrank a page with thin content, but between two pages of similar relevance, the one with better field scores tends to win the tiebreaker.

More relevant to day-to-day engineering work: these metrics correlate directly with conversion and retention. Documented case studies back this up. Vodafone Italy improved LCP by 31% and saw an 8% lift in sales. Tokopedia cut LCP by 55% and gained a 23% longer average session duration. The Economic Times improved CLS by 250% and LCP by 80%, cutting bounce rate by 43% (web.dev business impact case studies).

There's also a forward-looking reason to care. As AI-driven search and answer engines crawl and render pages to generate summaries, faster and more stable markup is easier for them to parse and cite. Performance work is increasingly discoverability work too.

What code-level mistakes usually tank each metric?

Most Core Web Vitals regressions trace back to a small set of repeat offenders.

LCP killers:

  • Serving full-resolution images instead of compressed WebP or AVIF variants
  • Render-blocking CSS or JavaScript in the <head>
  • Slow time-to-first-byte from unoptimized server response or missing caching

INP killers:

  • Long JavaScript tasks that monopolize the main thread during interaction
  • Third-party scripts (chat widgets, analytics, ad tags) firing synchronously
  • Oversized DOM trees that make every style recalculation expensive

CLS killers:

  • Images or embeds without explicit width and height attributes
  • Ads or dynamic content injected without reserved space
  • Web fonts that swap in late and reflow text (missing font-display strategy)

What are the quickest fixes for each metric?

You don't need a full rebuild to move the needle. Here's where to start.

Fixing LCP:

<link rel="preload" as="image" href="/hero.webp" fetchpriority="high">
Enter fullscreen mode Exit fullscreen mode

Preloading your largest above-the-fold asset tells the browser to fetch it immediately instead of discovering it late in the render tree. Pair this with modern image formats and a CDN to cut both file size and latency.

Fixing INP:

function processLargeList(items) {
  let i = 0;
  function chunk() {
    const end = Math.min(i + 50, items.length);
    for (; i < end; i++) {
      renderItem(items[i]);
    }
    if (i < items.length) {
      requestIdleCallback(chunk);
    }
  }
  chunk();
}
Enter fullscreen mode Exit fullscreen mode

Breaking long tasks into smaller chunks and yielding to requestIdleCallback (or scheduler.yield where supported) keeps the main thread free to respond to input. Also worth auditing: any third-party script that isn't deferred or lazy-loaded.

Fixing CLS:

<img src="/product.webp" width="800" height="600" alt="Product photo">
Enter fullscreen mode Exit fullscreen mode

Explicit dimensions let the browser reserve space before the image loads, eliminating the shift entirely. Apply the same logic to ad slots and embeds by reserving a fixed-height container up front.

How do you measure Core Web Vitals in practice?

Lab tools and field tools answer different questions, and developers should use both:

  • Google Search Console shows aggregated field data for your indexed URLs, grouped by pass/fail status.
  • PageSpeed Insights combines field data with a Lighthouse lab run and gives specific, actionable recommendations.
  • Chrome DevTools Performance panel is best for reproducing and debugging a specific slow interaction.
  • CrUX is the raw dataset behind Google's field scores, useful if you want to query it directly via BigQuery.

Treat lab data as a debugging tool and field data as the source of truth. A perfect Lighthouse score with a failing Search Console report usually means your real users are on slower devices or networks than your test environment.

Where to go deeper on Core Web Vitals

Core Web Vitals reward the same habits good engineers already practice: lean JavaScript, deliberate asset loading, and layouts that don't shift under the user. Start by pulling your Search Console report, sort by whichever metric is furthest from "good," and work the fixes above in priority order.

For a more complete walkthrough, including business impact data and a breakdown of monitoring tools, check out the full guide on Core Web Vitals and why they matter over on the Razen Creations blog.

FAQ

What are the three Core Web Vitals?

LCP (loading speed), INP (responsiveness), and CLS (visual stability). Each has its own passing threshold measured from real user data.

Did INP really replace FID?

Yes. INP became the official responsiveness metric in March 2024, and Chrome retired FID support in September 2024. INP measures every interaction in a session rather than just the first one.

Can a good Lighthouse score still fail Core Web Vitals in Search Console?

Yes. Lighthouse is a lab test run under controlled conditions. Search Console reflects real users on real devices and networks, which is why field data should always take priority when diagnosing issues.

Which Core Web Vital is hardest for developers to fix?

INP tends to be the toughest, since it usually requires restructuring how and when JavaScript executes rather than a single quick patch.

Do Core Web Vitals affect SEO rankings directly?

They act as a tiebreaker rather than a dominant ranking factor. Their more measurable impact tends to show up in conversion rate and bounce rate, not raw position changes.

Top comments (0)