01What are Core Web Vitals?
Core Web Vitals are Google's three user-experience metrics for page loading, responsiveness and visual stability. They feed into Google's page experience signals, but the better reason to care is that they track what visitors actually feel: a slow, laggy, jumpy page loses people before they read anything.
Google assesses each metric at the 75th percentile of real page loads, split by mobile and desktop. That means a page passes only if at least three quarters of visits hit the good threshold, so a fast developer laptop proves very little. Performance is one part of the broader checklist in my professional website development guide; this article goes deep on just this part.
- Largest Contentful Paint (LCP): when the largest image or text block in the viewport finishes rendering. Good is 2.5 s or less, poor is over 4 s.
- Interaction to Next Paint (INP): how long the page takes to visually respond to clicks, taps and key presses across the visit. Good is 200 ms or less, poor is over 500 ms. INP replaced First Input Delay in 2024.
- Cumulative Layout Shift (CLS): how much visible content moves unexpectedly. Good is 0.1 or less, poor is over 0.25.
02How to measure Core Web Vitals: field data vs lab data
There are two kinds of data, and mixing them up is the most common mistake I see. Field data comes from real Chrome users, collected in the Chrome UX Report over a rolling 28-day window. Lab data comes from a single simulated load, such as a Lighthouse run. Google's assessment uses field data; lab data is a diagnostic tool.
PageSpeed Insights shows both on one page: the field data at the top (if the URL or origin has enough traffic) and a Lighthouse lab run below. Search Console's Core Web Vitals report groups URLs with similar problems, which is useful for finding which template is failing. For a new or low-traffic site there may be no field data at all, in which case lab data and your own real-user measurement are what you have.
- Search Console Core Web Vitals report: which groups of URLs are failing in the field.
- PageSpeed Insights: field and lab data for a specific URL, with diagnostics.
- Chrome DevTools Performance panel: record a real interaction to find the slow task behind a bad INP.
- Real-user monitoring: the web-vitals library, or the useReportWebVitals hook in Next.js, sending metrics to your analytics.
Because field data is a 28-day rolling window, a fix you deploy today will take weeks to fully show up in Search Console. Verify in the lab, then be patient.
03How to improve LCP in React and Next.js
On marketing and business websites, the LCP element is almost always the hero image or the main headline. The fix depends on which one it is and why it's late: slow server response, the resource being discovered late, the file being too large, or rendering being blocked.
In Next.js, use the Image component for the hero and tell the browser it matters. In Next.js 16 the old priority prop is deprecated; set loading to eager or fetchPriority to high on the LCP image, or use the new preload prop when the image needs to start loading from the document head. Never lazy-load the hero. Make sure the image is served in a modern format at the size it is actually displayed, using the sizes prop for responsive layouts.
Server response time matters as much as the image. Statically generated pages served from a CDN have a very short time to first byte. A page that waits on a slow database query or third-party API before sending any HTML will struggle to reach a good LCP whatever you do on the frontend.
- Statically generate or cache pages wherever the content allows it.
- Give the LCP image eager loading or high fetch priority, and never lazy-load it.
- Serve correctly sized AVIF or WebP images with an accurate sizes attribute.
- Avoid hero content that only appears after client-side JavaScript runs or a data fetch completes.
- Inline or minimise render-blocking CSS, and avoid large CSS-in-JS runtimes on content pages.
05How to fix INP: JavaScript, hydration and third-party scripts
INP is the metric React sites most often fail, because it measures what happens when the main thread is busy. Every interaction has to wait for whatever JavaScript is currently running. Large bundles, expensive re-renders and hydration of the whole page all keep the main thread occupied.
In the Next.js App Router, Server Components are the biggest lever. Content that never changes on the client does not need to ship JavaScript at all, so keep 'use client' boundaries as small and as low in the tree as you can. A marketing page where the entire layout is a client component hydrates far more than it needs to; one where only the menu, form and carousel are client components hydrates almost nothing.
For the interactions themselves, keep event handlers cheap. Update the visible state first and defer the expensive work. React's useTransition and useDeferredValue exist for exactly this: typing in a filter box should update the input immediately, and the filtered list can follow. Third-party scripts are the other usual suspect. Chat widgets, tag managers and heatmap tools each add main-thread work; load them with the Script component's lazyOnload or afterInteractive strategy, and remove the ones nobody looks at.
- Move static content into Server Components and push client boundaries down to leaf components.
- Code-split heavy, below-the-fold widgets with dynamic imports.
- Use useTransition or useDeferredValue so expensive updates do not block input.
- Avoid re-rendering large lists on every keystroke; memoise or virtualise them.
- Audit third-party scripts and defer or remove what you can.
The fastest JavaScript is the JavaScript you never send. Before optimising a component, ask whether it needs to run in the browser at all.
06How to fix CLS: reserving space for everything
Layout shift happens when the browser places content and then has to move it because something above it changed size. The fix is always the same principle: reserve the space before the content arrives.
The Next.js Image component requires width and height (or fill inside a sized container) for this reason, so images rarely cause CLS when it is used properly. The usual culprits on React sites are elsewhere: cookie banners pushed in at the top of the page, embeds and ads without a fixed container, content that renders differently on the server and the client, and skeleton loaders that are a different height from the content that replaces them.
- Always give images and video explicit dimensions or an aspect-ratio container.
- Render cookie and announcement banners as overlays, or reserve their height in the layout.
- Give embeds, iframes and ad slots a fixed minimum height.
- Avoid hydration mismatches, such as rendering dates or user-specific content differently on server and client.
- Animate with transform and opacity rather than properties that change layout.
07A Core Web Vitals workflow that actually sticks
Fixing Core Web Vitals once is easy; keeping them fixed is the hard part. New images get uploaded at full camera resolution, someone adds a marketing script, a new section becomes a client component. I treat performance like any other regression: measured on every significant change, not audited once a year.
When I rebuilt my own developer portfolio on server-rendered routes, the same change that gave every page complete HTML on first load also fixed its indexing problem, which I described in how I fixed Discovered – currently not indexed. The two problems are often connected: pages that render slowly on the client tend to render poorly for crawlers too. The same thinking applies to choosing between plain React and Next.js at the start of a project.
If your site is failing Core Web Vitals in Search Console and you'd like someone to find and fix the cause, that's exactly what my website performance and SEO optimization service covers. For new builds, performance is planned in from the start of the website development process.
- Check Search Console monthly and investigate any URL group that moves out of good.
- Run Lighthouse on key templates before each release.
- Collect real-user metrics in production so you are not waiting 28 days to see a regression.
- Set image upload limits and automatic resizing in the CMS.
- Require a reason for every new third-party script.
