Measuring Core Web Vitals in the Field: What Really Breaks LCP, INP and CLS, and How to Fix It
Why do users see a slow page while the lab report is green? Setting up real user monitoring, LCP load delay, yielding the main thread for INP, reserving space for CLS, and fixes that backfire.
Whether a page is fast is not something a Lighthouse report on a developer laptop can tell you. Real users arrive on mid-range phones, on congested mobile networks, in browsers full of extensions. Core Web Vitals reduce that experience to three numbers: when the largest content appears (LCP), how quickly the page responds to input (INP), and how much it shifts while loading (CLS). This post covers how to measure the three in the field, what actually breaks them, and where common fixes backfire.
Thresholds, and why the 75th percentile
The "good" thresholds are LCP at 2.5 seconds, INP at 200 milliseconds and CLS at 0.1. INP above 500 milliseconds is rated "poor". The assessment is not an average but the 75th percentile of page loads: if a quarter of your users are over the line, the page fails. The practical consequence is that improvements on fast devices make the average look nicer without moving the target. The real gains come from users in the slow tail of the distribution.
INP replaced FID in March 2024. FID only looked at the input delay of the first interaction, and almost every site passed it. INP takes one of the worst interactions across the whole visit (clicks, taps and key presses) and counts handler execution and the next paint as well. Plenty of applications that passed FID comfortably turned red on INP.
Lab data versus field data
Lighthouse and similar tools produce lab data: a fixed device profile, fixed network throttling, a single load. That is good for comparing the effect of a change, but it has two blind spots. First, Lighthouse does not interact with the page during a load, so it cannot measure INP; it reports Total Blocking Time instead, which is only a rough proxy. Second, consent banners, logged-in content, A/B tests and cache state do not exist in the lab.
There are two sources of field data. The Chrome User Experience Report (CrUX) aggregates Chrome users over a rolling 28-day window for origins with enough traffic. It is free, but delayed, Chrome-only and empty for low-traffic pages. The more useful option is collecting your own real user monitoring (RUM) data. To take a side: Web Vitals work done without RUM usually optimizes the wrong page.
Collecting your own data
You can compute these metrics from the browser APIs yourself, but the edge cases (backgrounded tabs, restores from the back/forward cache, interaction grouping) are tedious. The Chrome team's web-vitals library handles them correctly. Use the attribution build for diagnosis; it also reports the element responsible and the timing breakdown:
import { onLCP, onINP, onCLS } from 'web-vitals/attribution';
function send(metric) {
const body = JSON.stringify({
name: metric.name,
value: metric.value,
rating: metric.rating,
id: metric.id,
page: location.pathname,
attribution: metric.attribution,
});
if (!navigator.sendBeacon('/rum', body)) {
fetch('/rum', { method: 'POST', body, keepalive: true });
}
}
onLCP(send);
onINP(send);
onCLS(send);
The library keeps updating CLS and INP until the page is hidden, so you may receive several records with the same id. Keep the last value per id on the server. Group measurements by page template (product page, listing, checkout) and by device class; a single site-wide number never tells you what to fix.
LCP: usually the image is discovered too late
LCP breaks down into four parts: time to first byte (TTFB), resource load delay until the resource is discovered, resource download, and element render. The attribution data reports each part separately. The pattern seen most often in the field is not a slow download but a long load delay: the LCP image is not in the HTML but in an element added later by JavaScript, or in a CSS background, and the browser's preload scanner cannot see it.
Fix it in this order:
- Ship the LCP image in the HTML as a real
<img>, not something rendered on the client. - Raise its priority:
<img src="hero.avif" fetchpriority="high" width="1200" height="630" alt="...">. - If the image comes from another origin, open the connection early with
<link rel="preconnect">, or serve it from the same origin. - Only then work on image size and format (AVIF, WebP,
srcsetwith correct widths).
If TTFB itself is long, front-end work hits a ceiling. For server-rendered pages, cacheable HTML and removing redirect chains give the biggest win here.
INP: who is holding the main thread
INP has three components: input delay (the main thread is busy when the event arrives), processing time (your event handlers running) and presentation delay (style, layout and paint). The attribution data tells you which one dominates and which element had the worst interaction.
High input delay is often not your handler at all, but third-party scripts, analytics tags, or a large hydration task running at the same moment. High processing time means the handler does everything in one go. The effective pattern is to give the user visible feedback first and defer the rest:
function yieldToMain() {
if (globalThis.scheduler?.yield) return scheduler.yield();
return new Promise((r) => setTimeout(r, 0));
}
button.addEventListener('click', async () => {
button.classList.add('loading');
await yieldToMain();
applyFilters();
await yieldToMain();
reportAnalytics();
});
scheduler.yield() is not available in every browser, so the fallback is mandatory. If presentation delay is high, look at very large DOM trees, components that re-render an entire list after an interaction, and read/write loops that force synchronous layout. For long lists, content-visibility: auto cuts rendering cost for off-screen sections.
CLS: loading content without reserving space
Shifts come from content that arrives late and pushes the elements below it. The usual sources are images and iframes without dimensions, ads and banners injected after load, and line height that changes when the web font swaps in.
Give images width and height attributes; the browser derives the aspect ratio from them and reserves space even if CSS makes the width fluid. For ads, consent banners or late components, reserve the container height up front with min-height. For fonts, use size-adjust and ascent-override in @font-face to bring the fallback font closer to the web font; font-display: swap on its own does not prevent shifts, it only prevents invisible text.
Shifts within 500 milliseconds of a user input are excluded from CLS. Content revealed by a "show more" button is therefore fine; the problem is content that moves while the user is doing nothing.
Pitfalls
Putting loading="lazy" on the LCP image. A plugin or component that adds lazy loading to every image also delays the hero image above the fold, and LCP jumps by seconds. Apply lazy loading only to images below the fold.
Preloading everything. Preload priority is a limited resource. Preloading five fonts, three images and two scripts pushes the LCP image behind all of them. Promote only the one or two resources that are truly critical.
Measuring only cold loads. In single-page applications LCP is not re-measured on client-side navigation, but INP and CLS accumulate over the whole visit. An app that looks clean in the lab can fail in the field because INP degrades over long sessions.
Tabs opened in the background. If a user opened the tab in the background and looked later, LCP becomes meaninglessly large. web-vitals handles this; if you write your own measurement, you have to check whether the page was visible.
Looking at averages. Showing averages on a RUM dashboard hides the tail that matters. Always track the 75th percentile, ideally split by device class.
When not to bother
For internal admin panels behind a login, used by a small number of people on well-equipped desktops, chasing Core Web Vitals targets is usually poor value. What slows those users down is typically slow API calls, and the right metric there is server time per interaction. The value of Web Vitals shows up on public pages that depend on search traffic and a wide range of devices. Use RUM first to see which template and which device class is over the line, and work only there.