Worried your pages feel sluggish? Here is how to speed up your website: measure real visits first, then trim JavaScript, break up long tasks and fix whichever Core Web Vital fails.
This guide is one part of the bigger picture on how to build a good website, so it pairs well with the rest of that topic.
| Measure | Target or finding |
|---|---|
| Good Largest Contentful Paint (LCP), loading | 2.5 seconds or less |
| Good Interaction to Next Paint (INP), responsiveness | 200 milliseconds or less |
| Good Cumulative Layout Shift (CLS), visual stability | 0.1 or less |
| Where to judge the scores | 75th percentile of page loads |
| Mobile sites missing the good INP threshold | 23% |
The targets come from the web.dev Web Vitals page and the survey figure from Vercel’s Core Web Vitals guide. Thresholds and survey figures can change, so check the source before you rely on them.
Measure real visits before you change anything
The quickest way to waste an afternoon is to tune the wrong thing. Vercel’s guide points out that a page can score well in Lighthouse and still fail the assessment, because Google scores all three metrics from field data rather than lab tests.
A lab run loads the page in a fixed, emulated setup and never interacts with it, so Lighthouse gives no INP score at all. Field data from the Chrome User Experience Report (CrUX) comes from real visits across the devices, networks and locations your own traffic uses.
That gap explains why a page can look strong in PageSpeed Insights while the CrUX panel on the same report shows failing vitals. Compare both panels for the same URL, then work on whichever metric fails in the field panel.
What counts as fast enough?
Google’s Web Vitals initiative narrows speed down to three Core Web Vitals that cover loading, interactivity and visual stability. According to the web.dev Web Vitals page, a page passes only when it meets the recommended targets at the 75th percentile for all three.
- LCP tracks loading: how soon the main content shows up.
- INP tracks interactivity: how quickly the page reacts after a click, tap or key press.
- CLS tracks visual stability: whether content jumps around as the page loads.
The Web Vitals page advises you to measure the 75th percentile of page loads, segmented across mobile and desktop, because it shows what most of your visitors get rather than your best case. Vercel’s guide reports that 23% of mobile sites miss the good INP threshold, so responsiveness is where many sites have the most to gain.

Cut the JavaScript you ship
Websites are shipping more JavaScript than ever before, and the trend doesn’t appear to be changing, as web.dev’s guide to the most effective Core Web Vitals fixes observes. Every extra script competes for the browser’s main thread, which hurts responsiveness most during startup.
These steps from that guide shrink the work the browser must do early on:
- Run the coverage tool in Chrome DevTools to find unused code in your scripts.
- Use code splitting so code that is not needed for the first render lives in its own bundle.
- Prefer widely available platform features over redundant, JavaScript-based versions of the same thing.
- Review your tag manager’s tags on a schedule and remove old ones.
Tags deserve extra attention because forgotten ones keep adding script weight long after anyone needs them. Vercel’s guide adds that deferring non-critical scripts until the page is interactive frees the same thread.
Break up long tasks so pages respond
When a task exceeds 50 milliseconds, it becomes a long task. web.dev explains that long tasks can block the main thread from answering user interactions quickly.
The remedy is to yield to the main thread often. Chunk the work and yield between the pieces with scheduler.yield() where the browser supports it, which gives the page room to handle taps and paint updates in between.
Inside event handlers, batch your DOM changes, schedule visual updates with requestAnimationFrame and move non-UI calculations to a web worker. For long pages, Vercel’s guide says content-visibility: auto lets the browser skip rendering work for off-screen content while keeping it available to find-in-page and the accessibility tree.
A sensible order of work
You rarely have time for every optimization, so sequence them by payoff. This order keeps you from guessing:
- Open PageSpeed Insights and note which vital fails in the field panel.
- Remove unused scripts and stale tags first, since less code helps every metric.
- Split and yield long tasks on the pages where interactions feel slow.
- Re-check field data after the change instead of trusting a single lab score.
Speed is only one side of a good site, so it helps to check your pages against the common web design mistakes too. Once pages load briskly, run through the web accessibility checklist so that fast pages also work for everyone.
Frequently asked questions
Why does Lighthouse look fine when Google says my page is slow?
Show answer
A Lighthouse run is one emulated visit with no clicks, while Google judges real Chrome users. Look at the field panel, as Vercel’s walkthrough advises, and fix the metric that fails there.
Did INP replace First Input Delay?
Show answer
Yes. Vercel’s guide dates the switch to March 2024, so advice that still targets FID measures the wrong thing.
Will passing the vitals lift my search rankings?
Show answer
Not by itself. The same guide says relevance and content quality are stronger ranking factors, and page experience only decides between pages Google already rates as comparably relevant.
Should I get rid of my tag manager?
Show answer
No, but audit it. The web.dev guide recommends optimizing tags periodically so old ones with unused code stop inflating your script footprint.



