Core Web Vitals: how to make a slow page fast
A slow page loses visitors before they read a word. Google measures speed with three numbers, the Core Web Vitals. This guide explains what each one means, how to find the cause on your own pages, and which fixes to do first.
Updated · For agents: Markdown · skill
Three numbers, three questions
Google’s Core Web Vitals answer three questions a visitor asks without knowing it:
| Metric | The question | Good | Poor |
|---|---|---|---|
| Largest Contentful Paint (LCP) | When can I see the main content? | 2.5 s or less | over 4 s |
| Interaction to Next Paint (INP) | Does the page react when I tap? | 200 ms or less | over 500 ms |
| Cumulative Layout Shift (CLS) | Does the page stay still while I read? | 0.1 or less | over 0.25 |
A page passes when three out of four real visits are in the good range. That detail matters: you are judged on your slower visitors, usually people on phones.
Many older guides and videos still mention First Input Delay (FID). INP replaced it in March 2024. FID only measured the delay before the first tap was handled. INP looks at every tap, click and key press during the visit and reports about the slowest one.
Measure before you change anything
There are two kinds of measurement, and you need both:
- Field data is what real visitors experienced. PageSpeed Insights shows it at the top of the report for sites with enough traffic, and Google Search Console has a Core Web Vitals report. This is the data Google uses.
- Lab data is one test run on a simulated phone. It is repeatable and tells you why a page is slow. Lighthouse, in Chrome DevTools or in PageSpeed Insights, is the usual tool.
A lab test cannot measure INP, because nobody taps anything. It reports Total Blocking Time (TBT) instead: how long scripts kept the page busy while loading. A high TBT usually means a poor INP.
Test the pages that earn money, not only the home page: a product page, a category page, the cart. And test as a phone on a slow connection. A page that feels instant on your laptop can take eight seconds on a three-year-old Android.
Fix LCP: the main content appears late
Find out what the LCP element is first. Lighthouse names it, and it is nearly always the large image at the top or the main heading. Then work through the four places time can be lost:
- The server is slow to answer. If the HTML takes more than 0.8 seconds to arrive, nothing after it can be fast. Cache pages, use a CDN, and look at slow database queries.
- The browser finds the image late. An image set by JavaScript or as a CSS background is only discovered after those files load. Put it in the HTML as an
<img>and addfetchpriority="high". - The image is lazy-loaded.
loading="lazy"is right for images further down. On the main image it delays the one thing you want first. - The image is heavy. Serve WebP or AVIF, at the size it is shown. A 3000 px photo in a 400 px slot wastes most of the download.
Then clear the path in front of it. Scripts in the head without defer or async, and large stylesheets, hold back everything on the page until they finish.
Fix INP: the page reacts late
A browser can do one thing at a time on its main thread. While it runs a long script, it cannot respond to a tap. The fix is always less work, or work in smaller pieces:
- Send less JavaScript. Remove libraries you no longer use. Load code only on the pages that need it.
- Delay third-party scripts. Chat widgets, analytics, maps and A/B testing tools are common causes. Load them after the page is usable, or when the visitor first needs them.
- Break up long tasks. Any task longer than 50 ms can delay a tap. Split heavy work so the browser can respond in between.
- Show a response at once. If an action takes time, change the button state immediately and do the work after.
Fix CLS: the page jumps
Layout shift happens when something loads late and pushes the content down, often just as the visitor is about to tap. The usual causes:
- Images and videos without a size. Add
widthandheightto every one, so the browser keeps the space free. - Banners, ads and embeds. Give each a container with a fixed height before it loads. A cookie banner should overlay the page, not push it down.
- Fonts. When the web font replaces the fallback, text can reflow. Use
font-display: swapwith a fallback font of similar width, oroptional. - Content inserted above what is already there. Add new content below, or in space reserved for it.
What to do first
Fix in the order of the page load, because early delays make every later number worse:
- Server response time.
- The main image: in the HTML, prioritised, not lazy, small.
- Render-blocking scripts and styles.
- Sizes on images and embeds.
- JavaScript weight and third-party scripts.
- Compression and caching.
Measure again after each change. A fix that looked obvious sometimes moves nothing, and you want to know that before you do the next one.
Speed does not stay fixed
A new tracking script, a larger hero image or a plugin update can undo all of this in one release. Check the same pages on the same phone profile after every change to the site, and keep the numbers, so you can see which change made a page slower. A free WitnessQA audit measures these on a phone profile and names the file or image behind each issue.
Watch
Two videos that explain the same ground, both a few years old and still using FID where INP now applies:
- The ultimate guide to web performance, Beyond Fireship. A short tour of the metrics and the tools that measure them.
- Core Web Vitals Explained: How To Fix Site Optimization Issues, Matt Diggity. Fix by fix, for site owners rather than developers.
The checklist
Every step says what to do and how to verify it from outside. The tags are the WitnessQA checks that verify it for you in a free audit. Agents can load the same list as a skill file.
- Measure on a phone, not on your desk
Test each key page with a mid-range phone profile on a slow 4G connection. A fast laptop on office wifi hides most problems.
Verify: Run the page in a browser with phone emulation and network throttling. Record Largest Contentful Paint, Cumulative Layout Shift and Total Blocking Time.
- Get the server to answer quickly
The first byte of the HTML arrives within 0.8 seconds. Cache pages that do not change per visitor and serve them from a CDN.
Verify: Request the page and time the first byte of the response. It is at most 0.8 s.
- Let the browser find the main image early
The largest image on the first screen is an
<img>in the HTML withfetchpriority="high", not lazy-loaded and not added by a script or a CSS background.Verify: Read the HTML the server sends. The main image is in it, without
loading="lazy". - Make images small
Serve images in WebP or AVIF, at about the size they are shown, and compress the main image hardest.
Verify: List the images on the page. None is far larger than its displayed size, and large ones are not JPEG or PNG.
- Remove what blocks the first paint
Load scripts with
deferorasync, inline the small amount of CSS the first screen needs, and drop stylesheets and scripts the page does not use.Verify: Read the head of the page. No script without
deferorasync, and no large stylesheet, sits before the content. - Send less JavaScript
Remove unused libraries, split the code per page, and load widgets such as chat and maps only when they are needed.
Verify: Add up the JavaScript the page downloads. Total Blocking Time is at most 200 ms.
- Reserve the space for everything that loads late
Every image and video has
widthandheight. Banners, ads and embeds get a box of fixed size before they load.Verify: List the
<img>elements. Each haswidthandheightor a CSS aspect ratio. Cumulative Layout Shift is at most 0.1. - Show text while fonts load
Use
font-display: swaporoptional, and load as few font files as the design needs.Verify: Read the
@font-facerules. Each has afont-displayvalue other thanblock. - Compress and cache files
Send text files with Brotli or gzip. Give files with a hash in their name a long
Cache-Controlmax-age.Verify: Read the response headers of the CSS and JavaScript files. Each has
content-encodingand acache-controlmax-age of at least a week. - Keep the page light
Keep the total download of a page small enough for a phone on mobile data.
Verify: Add up everything the page downloads on first load and compare it with the last measurement.
See which of these your site passes, with evidence for each.
Run a free audit