# Core Web Vitals Explained: A Practical Guide to Faster Pages

By Mahmod Jnead · October 19, 2026 · 5 min read · Technical

> LCP, INP, and CLS explained in plain language, with concrete fixes for images, JavaScript, fonts, and layout shifts that make real pages faster.

Speed is one of the few product features that every user notices and almost no one asks for. A slow page quietly loses visitors, hurts conversions, and can weigh on search visibility. Core Web Vitals are Google's attempt to turn "feels fast" into three measurable signals, and they are a useful checklist even if you never think about search rankings.

This post explains each metric, how to measure it, and the fixes that usually give the biggest gains.

## The three metrics

Core Web Vitals focus on three aspects of user experience: loading, interactivity, and visual stability.

-   **Largest Contentful Paint (LCP)** measures how long it takes for the biggest visible element, usually a hero image or headline, to render. A good score is 2.5 seconds or less.
    
-   **Interaction to Next Paint (INP)** measures how quickly the page responds visually after a user clicks, taps, or types. A good score is 200 milliseconds or less.
    
-   **Cumulative Layout Shift (CLS)** measures how much content unexpectedly jumps around while loading. A good score is 0.1 or less.
    

These thresholds are assessed at the 75th percentile of real visits, so you need to be fast for most of your users, not just on your own laptop.

## Measure before you optimize

Guessing wastes time. Use two kinds of data:

-   **Lab data** comes from tools like Lighthouse and the performance panel in your browser. It is repeatable and great for debugging.
    
-   **Field data** comes from real users, via the Chrome User Experience Report or a small script using the `web-vitals` library. It shows what people actually experience on real devices and networks.
    

Lab tests tell you why something is slow. Field data tells you whether it matters. You need both.

```ts
import { onLCP, onINP, onCLS } from "web-vitals";

function send(metric) {
  navigator.sendBeacon("/api/vitals", JSON.stringify(metric));
}

onLCP(send);
onINP(send);
onCLS(send);
```

## Improving LCP

Most slow LCP comes from four causes: slow server response, render-blocking resources, slow resource load times, and client-side rendering delays. Work through them in this order.

**1\. Optimize the main image.** The hero image is often the LCP element.

-   Serve modern formats like WebP or AVIF.
    
-   Size images to the space they occupy rather than shipping a huge original.
    
-   Do not lazy-load the LCP image. Give it high priority instead.
    

```html
<img src="/hero.avif" width="1200" height="630"
     fetchpriority="high" alt="Product dashboard" />
```

**2\. Speed up the server.** A slow first byte delays everything after it. Use caching, a CDN, and efficient data fetching. Rendering on the server or at build time often beats waiting for JavaScript to build the page in the browser.

**3\. Remove render-blocking resources.** Inline critical CSS, defer non-essential scripts, and avoid loading large stylesheets that the first screen does not need.

**4\. Preload what matters.** Use `preload` for key fonts and the hero image so the browser discovers them early.

## Improving INP

INP replaced the older First Input Delay metric because it considers every interaction during a visit, not just the first. Poor INP almost always means the main thread is busy when the user tries to act.

Common culprits and fixes:

-   **Long tasks.** Any JavaScript that runs for more than fifty milliseconds blocks input. Break work into smaller chunks and yield to the browser between them.
    
-   **Heavy event handlers.** Do the minimum in the handler, update the interface first, and defer the rest.
    
-   **Too much JavaScript.** Audit your bundle. Remove unused libraries, split code by route, and load features only when needed.
    
-   **Expensive rendering.** Large lists and deep component trees can make updates slow. Virtualize long lists and avoid unnecessary re-renders.
    

```ts
async function processItems(items: Item[]) {
  for (const item of items) {
    handle(item);
    // Yield so the browser can respond to input
    await new Promise(resolve => setTimeout(resolve, 0));
  }
}
```

Third-party scripts such as analytics, chat widgets, and tag managers are frequent offenders. Load them late, and question whether each one earns its cost.

## Improving CLS

Layout shift happens when elements appear or resize after the user has started reading. It is frustrating, particularly when it causes a misclick. The fixes are mostly about reserving space.

-   **Set dimensions on images and videos.** Include width and height attributes, or use the CSS `aspect-ratio` property, so the browser can reserve space before the file arrives.
    
-   **Reserve room for ads, embeds, and banners.** Give their containers a fixed or minimum height.
    
-   **Handle fonts carefully.** A late-loading web font can reflow text. Preload important fonts, use `font-display: swap` thoughtfully, and choose a fallback with similar metrics.
    
-   **Avoid inserting content above existing content.** If something must appear dynamically, place it below the fold or in reserved space.
    
-   **Animate with transforms.** Animating `transform` and `opacity` does not trigger layout, unlike animating `top` or `height`.
    

## Frameworks can help

Modern frameworks include many of these optimizations. Next.js, for example, provides an image component that handles sizing, formats, and lazy loading, a font utility that avoids layout shift, and server rendering options that improve LCP. Using these built-ins correctly gets you most of the way there.

Just remember that a framework is not a guarantee. Shipping a large client-side bundle or marking every image as high priority can undo the benefits.

## Build a performance habit

One-time fixes decay as new features land. To keep scores healthy:

1.  **Set a performance budget.** Define limits for bundle size and key metrics, and fail the build when they are exceeded.
    
2.  **Run checks in CI.** Automated Lighthouse runs catch regressions before they reach users.
    
3.  **Monitor field data.** Watch trends weekly, not just after launches.
    
4.  **Review new dependencies.** Check the size cost before adding a library.
    

## A quick prioritization guide

If you only have an afternoon, do these in order:

-   Add width and height to every image.
    
-   Compress and properly size the hero image, and give it high priority.
    
-   Defer or remove one heavy third-party script.
    
-   Split the largest JavaScript bundle by route.
    
-   Measure again and compare.
    

## Final thoughts

Core Web Vitals are not about chasing a green score. They are a lens for caring about the experience of real people on ordinary phones and imperfect connections. Measure with real data, fix the biggest bottleneck first, and protect your gains with budgets and monitoring. A faster page is one of the rare improvements that benefits every user, every time they visit.
