Core Web Vitals are field metrics: they describe what real visitors experienced, not what a lab tool scored on a fast laptop. The three current metrics have been stable since Interaction to Next Paint replaced First Input Delay in March 2024, and the thresholds are well known:
| Metric | Good | What it measures |
|---|---|---|
| LCP — Largest Contentful Paint | ≤ 2.5 s | When the largest visible element in the viewport finished rendering. |
| INP — Interaction to Next Paint | ≤ 200 ms | How quickly the page responds to taps, clicks and key presses, across the visit. |
| CLS — Cumulative Layout Shift | ≤ 0.1 | How much visible content moved unexpectedly. |
“Good” means the 75th percentile of real page views meets the threshold, segmented by mobile and desktop. Averages hide the slowest quarter of your users, which is usually the quarter that matters.
1. Confirm the problem in field data first
Before touching code, answer three questions:
- Which template is failing? A site-wide LCP number is an average of very different pages. Break it down by route or page type.
- Which device class? Mobile field data is usually the constraint; a fix that only helps desktop is not a fix.
- Which metric is actually failing? Teams often assume LCP and spend weeks on images while INP is the metric below threshold.
Use the Chrome UX Report for a public baseline, and your own RUM for the detail. In the lab, reproduce with CPU and network throttling that resembles a mid-tier phone, not a developer machine.
2. Fix LCP before micro-optimising anything
LCP is a timeline with four parts: time to first byte, resource load delay, resource load duration and element render delay. Find which part dominates for the failing page:
- Slow TTFB: fix the server, caching or CDN. Client-side changes cannot compensate for an origin that takes two seconds to answer.
- Late resource discovery: the LCP image is often referenced from CSS, injected by
JavaScript, or lazy-loaded by mistake. Put it in the initial HTML, preload it, and set
fetchpriority="high". - Long load duration: compress and resize the image, serve AVIF or WebP, and avoid sending a 2400 px asset to a 390 px viewport.
- Render delay: render-blocking CSS and JavaScript, web fonts, and client-side rendering all push the paint later. Reduce critical CSS, defer non-critical scripts and consider SSR or prerendering for content pages.
A common own goal is lazy-loading the hero image. Lazy loading below-the-fold media is good; lazy loading the element that defines LCP adds a round trip at exactly the wrong moment.
3. Then attack INP
INP is about responsiveness, and the usual cause is main-thread work: long tasks, expensive rendering, heavy event handlers, hydration, and third-party scripts. The fix is to do less work per interaction and to yield when you cannot.
- Break up long tasks. Chunk large computations, and yield to the browser between chunks so input can be processed.
- Move work off the main thread. Parsing, diffing and sorting large datasets belong in a web worker.
- Reduce render scope. In Angular, use OnPush and signals; in React, memoise deliberately and avoid re-rendering an entire table for one cell.
- Virtualise long lists. The DOM cost of 2,000 rows is paid on every interaction, not just on load.
- Audit third parties. Chat widgets, tag managers, A/B testing and consent tooling can own more main-thread time than the application. Load them after interaction or not at all.
- Watch hydration. A large client-rendered tree hydrating during the first tap makes a fast server look slow. Use partial or incremental hydration where the framework supports it.
Test with real interactions. Click the primary action on a throttled device and record a trace. If the interaction handler, framework work and paint together exceed 200 ms, you have found the work to remove.
4. Treat CLS as a layout contract
Layout shift is largely preventable with discipline:
- Always set
widthandheight(or an aspect ratio) on images and video. - Reserve space for ads, embeds, banners and anything injected after load. An ad slot that collapses and expands is a CLS machine.
- Use
font-display: swapwith a metric-compatible fallback, or preload the font, to reduce reflow when the web font arrives. - Do not insert content above existing content after it has rendered. Prefer a skeleton that matches the final size.
- Animate with
transformandopacity, not properties that trigger layout.
5. Deal with third parties separately
Third-party scripts deserve their own budget. A tag manager can add dozens of tags that no frontend engineer reviews. Measure the cost of each one, remove what is not earning its place, and load the rest asynchronously or after the first interaction. For advertising and consent, reserve the space and use the provider’s supported consent integration rather than improvising with timers.
6. Do not optimise for a perfect lab score
A Lighthouse 100 is a useful signal, not the goal. The lab run cannot see your users’ devices, networks, caches or real interaction patterns. Use it for attribution and regression detection; use field data to decide whether the product actually improved.
7. Guard the result
- A performance budget in CI for the initial JavaScript and the LCP resource.
- RUM alerts on p75 LCP and INP, by route and device class.
- A pull-request question: does this add a blocking script, a font, an image without dimensions, or a dependency on the critical path?
- A quarterly review of third parties, with the default answer being removal.
- Before/after field data recorded for every performance initiative, so the next decision is based on evidence rather than opinion.
The order matters because the metrics have different causes. Fix the origin and the LCP resource first, then responsiveness, then layout stability. Do that with field data in front of you, and the numbers move for reasons you can explain — which is also how you keep them from sliding back.
Related reading: the framework-level checklist in The Angular performance checklist and the component-level quality checks in the WCAG 2.2 checklist.