Core Web Vitals: A Practical Fix Guide for Developers

Core Web Vitals are three user-experience metrics: loading, responsiveness and visual stability. They are not a score to chase in a lab. The numbers that matter come from real users on real devices, and the fixes that move them are usually unglamorous: smaller images, less JavaScript and fewer layout surprises.
Measure field data before you touch code
Start with the Chrome UX Report or your analytics platform to see how real users experience the site. Segment by device and connection type. A page that passes on a fast desktop can fail badly on a mid-range phone, and that is where most traffic lives.
Use Lighthouse or WebPageTest to reproduce the problem in the lab, but do not optimise the lab score alone. Field data is the outcome; lab data explains why.
Largest Contentful Paint
LCP usually lands on a hero image, a heading or a video poster. The fix order is: serve a correctly sized image, use a modern format, preload the hero, and remove render-blocking work ahead of it. If the server is slow, no front-end trick will save the score.
Check time to first byte. A cacheable page served from a CDN should respond in well under 500 milliseconds. If it does not, fix hosting and caching before touching the markup.

Interaction to Next Paint
INP measures how quickly the page responds to taps and clicks. Long JavaScript tasks are the usual cause. Break large tasks, defer non-critical scripts, and avoid heavy work in event handlers. Third-party tags are a common culprit: chat widgets, heatmaps and A/B tools all compete for the main thread.
Audit what is actually loaded. Remove tags nobody uses, load the rest after interaction, and set a budget for third-party JavaScript.
Cumulative Layout Shift
CLS happens when content moves after it renders. Images without dimensions, ads injected above content, web fonts swapping and cookie banners pushing the page are the usual causes. Set width and height on media, reserve space for embeds, and use font-display with a metric-compatible fallback.
Test on a slow connection. Layout shift is often invisible on a fast machine because everything arrives together.

Images and fonts
Serve responsive images with srcset and sizes, compress in AVIF or WebP, and lazy-load only below-the-fold media. Never lazy-load the hero image. Preconnect to critical origins and self-host fonts where possible to avoid an extra DNS lookup.
Subset fonts to the characters you use. A full font family with several weights can cost hundreds of kilobytes for a page that needs two weights.
JavaScript budgets
Set a hard budget for first-party and third-party JavaScript. Enforce it in CI so a new dependency cannot silently double the bundle. Prefer server rendering or static generation for content that does not need client-side interactivity.
Code splitting helps, but only if the critical path is small. A page that loads three frameworks to render a headline still feels slow.
"Core Web Vitals reward restraint. The fastest page is usually the one that ships less."
Verify and monitor
After each change, compare field data over a full week, not a single day. Use real-user monitoring and alert when a percentile crosses the threshold. Keep a performance budget in the deploy pipeline and review regressions like any other bug.
Pair this with the technical SEO audit so speed fixes are not undermined by crawl or index problems. If you are still choosing a platform, read the web stack guide first.

The bottom line
Measure real users, fix the largest element first, then responsiveness, then stability. Cut weight before adding tricks. Core Web Vitals are a symptom of engineering discipline, not a checkbox you pass once.