Skip to content

Performance

How to improve Core Web Vitals: the fixes that move LCP, INP and CLS

How to improve Core Web Vitals metric by metric, from Google's web.dev guidance: what to fix first for LCP, INP and CLS, with a worked LCP breakdown.

The CrispStats team · · 8 min read

In short

To improve Core Web Vitals, first find which metric fails on which pages using field data, then fix the cause for that metric. For LCP, make the main image discoverable in the HTML and prioritised, and cut server response time. For INP, break up long JavaScript tasks and keep event handlers light. For CLS, give every image, embed and ad a reserved size and keep pages eligible for the back/forward cache. Google’s web.dev team names these as the highest-impact fixes.

Most Core Web Vitals advice is a list of thirty tips, ranked by nothing. This guide is shorter on purpose. It follows the order Google’s own web.dev team recommends in its article on the most effective ways to improve Core Web Vitals, adds the reasoning behind each fix, and shows how to tell which fix your page needs before you start.

If you need the definitions first, read Core Web Vitals in plain English. In one line: LCP is load speed (good is 2.5 seconds or less), INP is responsiveness (200 milliseconds or less) and CLS is visual stability (0.1 or less), each judged at the 75th percentile of real visits.

Step zero: which metric is failing, and where?

Fixing the wrong metric is the most common waste of time. Start with field data, from real visits, before you open a lab tool:

  1. Search Console’s [Core Web Vitals report](https://support.google.com/webmasters/answer/9205520) groups your URLs by status and by metric, for mobile and desktop separately.
  2. [PageSpeed Insights](https://pagespeed.web.dev/) shows the Chrome UX Report field data for a URL or origin at the top, and a Lighthouse lab run below it.
  3. Your own real-user monitoring, if you have it, splits each metric by page, device and country, and covers pages with too little traffic for the Chrome UX Report.

Then rank: the pages with the most traffic and a poor or needs-improvement score come first. Split by device; most failures live on mobile. Only then reproduce the problem in a lab tool such as Chrome DevTools or Lighthouse, where you can see exactly what happened.

Thresholds and shares from web.dev’s top Core Web Vitals article, which cites the Chrome UX Report.
MetricGood at p75Share of sites missing itUsual root cause
LCP2.5 s or lessAbout 40% of sites in the Chrome UX ReportSlow server response, or a main image found late
INP200 ms or lessFewer sites pass than passed FID, the metric it replacedLong JavaScript tasks on the main thread
CLS0.1 or lessAbout a quarter of sitesImages, embeds and ads without reserved space

How to improve LCP

The web.dev team splits LCP into four parts and suggests a rough budget for each in its LCP optimisation guide. Measuring these parts tells you which fix to make:

From web.dev’s Optimize LCP guide. The shares are guidelines, not rules.
PartWhat it isRough share of a good LCP
Time to first byteFrom navigation start until the first byte of HTML arrivesAbout 40%
Resource load delayFrom the first byte until the browser starts fetching the LCP imageUnder 10%
Resource load durationHow long the LCP image itself takes to downloadAbout 40%
Element render delayFrom the image finishing until it is paintedUnder 10%

A worked example: reading an LCP breakdown

Say a product page has a p75 LCP of 4.0 seconds on mobile, which is poor. The breakdown from your field data or DevTools shows:

A worked example: reading an LCP breakdown
PartTimeShareGuideline
Time to first byte1.2 s30%About 40%
Resource load delay1.6 s40%Under 10%
Resource load duration0.8 s20%About 40%
Element render delay0.4 s10%Under 10%

The download itself is not the problem: 0.8 seconds is fine. The browser waited 1.6 seconds before it even started fetching the image. That pattern points to an image the browser could not discover in the HTML, typically one set by JavaScript, hidden behind a data-src attribute for a lazy-loading library, or marked loading="lazy". Fixing discovery alone could bring the delay under 0.4 seconds and LCP to about 2.8 seconds; trimming the server response then gets it under 2.5. Without the breakdown, the obvious move would have been compressing the image, which would have saved little.

The LCP fixes, in order

  • Make the LCP image discoverable and prioritised. Put it in the HTML as an <img> with src or srcset, never lazy-load it, and add fetchpriority="high". The web.dev team, citing the 2024 Web Almanac, reports that 73% of mobile pages have an image as their LCP element, 35% of those image URLs were not discoverable in the initial HTML, and only 15% of eligible pages used fetchpriority.
  • Cut [time to first byte](/glossary/ttfb). Cache HTML where you can, serve it from a CDN close to visitors, and avoid redirect chains on landing URLs. The same Almanac data showed only 33% of HTML documents were served from a CDN.
  • Aim for instant navigations. Prefetching or prerendering the likely next page, and keeping pages eligible for the back/forward cache, can make LCP close to zero for those visits.
  • Then shrink the image. Serve it at its displayed size in a modern format. This matters, but usually less than the first two.

How to improve INP

INP measures the slowest interaction on a page, roughly. Every interaction has three phases, and the INP optimisation guide gives fixes for each. The full explanation, with a worked example, is in INP explained.

How to improve INP
PhaseWhat slows itFix
Input delayOther scripts already running when the visitor tapsDo less work during page load; break up long startup tasks
Processing durationHeavy event handlersDo the visible update first, then yield and defer the rest
Presentation delayLarge DOM, big re-renders, forced layoutsSmaller DOM, content-visibility for off-screen content, no layout reads after writes
  • Yield often. Any task over 50 milliseconds is a long task. Split work and give the browser a chance to paint between pieces with scheduler.yield(), falling back to setTimeout where it is not supported (web.dev lists no Safari support).
  • Avoid unnecessary JavaScript. Remove unused code and third-party tags you no longer need; each one competes for the main thread.
  • Avoid large rendering updates. In single-page apps, one keystroke that re-renders a whole page is the classic cause of a slow INP.

How to improve CLS

The CLS optimisation guide lists the causes, and the fixes follow directly:

  • Set explicit sizes on everything loaded into the page. Add width and height to every image and video, or use CSS aspect-ratio. The web.dev team, again citing the 2024 Web Almanac, found 66% of pages have at least one unsized image.
  • Reserve space for late content. Ads, embeds, iframes, cookie banners and promo bars need a placeholder of the right size, or should overlay the page instead of pushing it down.
  • Keep pages eligible for the [back/forward cache](https://web.dev/articles/bfcache). A page restored from the cache does not lay out again, so its shifts do not repeat. Common blockers include unload handlers and Cache-Control: no-store on HTML.
  • Animate with `transform`, not layout properties. web.dev reports that pages animating layout-affecting CSS properties are 15% less likely to have good CLS.
  • Tame web fonts. Preload critical fonts, use font-display: optional where a late swap is not worth a shift, and match fallback metrics with size-adjust.

Remember what does not count: shifts within 500 milliseconds of a click, tap or key press are expected and excluded. A menu that opens when tapped is not a CLS problem.

How long until improvements show up?

Lab tools show a fix immediately. Field data does not. The Chrome UX Report, which PageSpeed Insights and Search Console use, reports the previous 28 days as a rolling window, updated daily, so a fix shipped today takes up to four weeks to show fully in those tools. Your own real-user monitoring shows the change from the next visit. Validate in Search Console only once the new numbers have had time to replace the old.

Do Core Web Vitals affect SEO?

Google’s Search Central page says Core Web Vitals, along with other page experience aspects, align with “what our core ranking systems seek to reward”, and that it highly recommends achieving good scores. It does not say how much weight they carry against relevance. In practice, treat them as a tie-breaker for search and as a direct factor in how visitors experience your pages, which is reason enough on its own.

How CrispStats helps you find what to fix

Once data-vitals is on the script tag, CrispStats collects web vitals from real visits. Step zero above, finding the failing page and device, takes one screen: LCP, INP and CLS at the 75th percentile, with FCP and TTFB, per page and per device type, plus LCP and TTFB per country for spotting a slow region. The script itself is about 2.2 KB gzipped for the core, and vitals collection stays off until you switch it on.

What it does not give you: LCP subpart breakdowns, interaction-level INP attribution, or lab testing. Use it to find the page and the metric, then reproduce and fix with Chrome DevTools or Lighthouse. Vitals regressions can also trigger an alert, so a deploy that slows the site down shows up within the alert window you choose rather than four weeks later.

Guide questions. Straight answers.

What people ask after reading this.

  • Find the failing metric on your busiest pages first. If it is LCP, make sure the main image is in the HTML, not lazy-loaded, and has fetchpriority set to high. If it is CLS, add width and height to every image and embed. Those two fixes are cheap and often move the 75th percentile on their own.

  • The field data at the top of PageSpeed Insights comes from the Chrome UX Report, which covers the previous 28 days. A fix takes up to four weeks to show fully there. The Lighthouse lab score below it updates immediately.

  • Whichever fails on the pages with the most traffic. A poor LCP on your top landing page matters more than a poor CLS on a page few people see. Use field data split by page and device to decide.

  • Google says good Core Web Vitals align with what its core ranking systems seek to reward and recommends achieving them, but it does not publish their weight. Relevance still comes first. They matter most when pages are otherwise similar.

  • Yes. Lighthouse runs one simulated load on one device, and it cannot measure INP because nobody interacts with the page. Core Web Vitals are judged on the 75th percentile of real visits, which includes slow phones and slow networks.

Not answered here? Write to hello@crispstats.com

Go further

Use cases

  • CrispStats for developers

    A small cookieless script with web vitals and error tracking, an npm SDK, a REST API and an MCP server, so your analytics fits the way you work.

  • CrispStats for SaaS

    See which channels bring paying customers, where trials stall in the funnel, and how your app performs for real users, from one cookieless script.

  • CrispStats for ecommerce

    Tie orders to the campaign, page and source they came from, find where checkout loses people, and watch page speed, without cookies.

Your traffic, crisp and clear

One script, no cookies, and every feature from the first day. Set up takes about as long as pasting a snippet.