Track 02 · Lesson 13 of 17Inside the browser

Track 02 · Inside the browser

Core Web Vitals

Lesson 13 of 17· 7 min

Google measures real users' experience with three numbers. They affect search ranking, but more importantly they track whether the page feels fast and stable. Try the layout shift demo: press Reload, then quickly try to click "Continue reading".

Catch the button

Press Reload, then click fast

  • LCP

    Largest Contentful Paint: when the main content appears.

    Good ≤ 2.5 s≤ 4 sPoor > 4 s
  • INP

    Interaction to Next Paint: how fast the page reacts to clicks and keys.

    Good ≤ 200 ms≤ 500 msPoor > 500 ms
  • CLS

    Cumulative Layout Shift: how much things jump around.

    Good ≤ 0.1≤ 0.25Poor > 0.25

City adds 40 new bike lanes

0.00

Layout shift score (CLS)

Press Reload, then try to click “Continue reading” as soon as you can.

<!-- The ad slot has no size until the ad arrives -->
<div id="ad-slot"></div>
<button>Continue reading</button>

The three numbers#

  • LCP, Largest Contentful Paint: how long until the biggest thing on screen, usually a hero image or headline, appears. Good is 2.5 seconds or less.
  • INP, Interaction to Next Paint: how long the page takes to visibly respond after a click, tap or key press. Good is 200 ms or less. Long tasks on the main thread are the usual culprit.
  • CLS, Cumulative Layout Shift: how much content jumps around while you're using it. Good is 0.1 or less.

How to fix each one#

  • LCP: compress and preload the hero image, serve it from a CDN, and don't make the page wait for scripts before it can show anything.
  • INP: keep event handlers short, and break up or move heavy work, as in the main-thread lesson.
  • CLS: give images, videos, ads and embeds a width and height or an aspect-ratio, and never insert content above what someone is reading.

Check yourself

Images on a page load late and push the text down as they appear. Which metric suffers, and what's the fix?