Fixing a slow or jumpy page: a step-by-step LCP and CLS workflow
Work through loading and layout-shift problems using a practical sequence based on web.dev's LCP and CLS guidance.
Our Core Web Vitals explainer says what the metrics are. This guide covers what to do when a page fails them, following Google's web.dev guides on optimizing Largest Contentful Paint (https://web.dev/articles/optimize-lcp) and Cumulative Layout Shift (https://web.dev/articles/optimize-cls). It is written for a business owner working with a developer.
Step 0: Look at real-user data first
web.dev says to look at what real users experience, not only lab tools such as Lighthouse, because lab tests alone may not represent users. Real-user data comes from Real User Monitoring tools on your site or from the Chrome User Experience Report (CrUX). PageSpeed Insights shows CrUX data in its top section when it exists, and falls back to whole-site data when a page has too little traffic, so check whether you are looking at page-level or site-level numbers.
The targets: LCP of 2.5 seconds or less and CLS of 0.1 or less, for at least 75 percent of page visits.
Part 1: LCP, in four pieces
web.dev says LCP time splits into four subparts that add up to the whole, with no gaps or overlaps:
| Subpart | Meaning | Rough share on a well-optimized page |
|---|---|---|
| Time to first byte (TTFB) | Start of navigation until the first byte of HTML arrives | about 40% |
| Resource load delay | TTFB until the browser starts loading the LCP resource | under 10% |
| Resource load duration | Time to load the LCP resource itself | about 40% |
| Element render delay | LCP resource finished until the element is fully rendered | under 10% |
web.dev calls these proportions guidelines, not strict rules, and warns against turning them into absolute millisecond targets; the parts are meaningful relative to each other. If your LCP is consistently within 2.5 seconds, the proportions matter little.
Find which part is oversized, then fix in this order, which web.dev presents as likely biggest impact first.
- Eliminate resource load delay. Make sure the main image or text starts loading as early as possible: make the resource discoverable in the HTML and give it high priority.
- Eliminate element render delay. Reduce or inline render-blocking stylesheets, defer or inline render-blocking JavaScript, consider server-side rendering, and break up long tasks.
- Reduce resource load duration. Make the image smaller (right size, modern formats, compression), move it closer to users with a content delivery network (CDN), avoid competing downloads, and use caching so repeat visitors skip the download. web.dev adds a caution: hosting images on a third-party domain adds a connection cost, and serving from your own origin is best.
- Reduce time to first byte. web.dev notes this is often the part developers control least but it affects everything after it. Common causes it names: several redirects (for example from ads or shortened links), visitors far from a server, and cached content that cannot be used because unique URL parameters (such as analytics tags) force requests back to the origin.
Part 2: CLS
web.dev lists the most common causes of poor CLS: images without dimensions, ads, embeds and iframes without dimensions, dynamically injected content, and web fonts. Fixes it describes:
- Give images dimensions (width and height attributes, or CSS aspect ratio).
- Reserve space for late-loading content such as ads and embeds, using min-height or aspect-ratio. If an ad might not fill, avoid collapsing the reserved space, since removing space can cause as much shift as adding content.
- Place late-loading content lower where you cannot reserve space; content injected near the top usually causes bigger shifts.
- Do not insert new content without a user action, such as banners popping in at the top. Reserve space or overlay instead.
- Handle web fonts: use a suitable fallback font, consider font-display: optional, reduce size differences between the fallback and the web font, and preload critical fonts.
Lab and field CLS can differ: web.dev says CrUX measures CLS across the whole page lifetime, while lab tools usually measure the initial load, so post-load shifts such as lazy-loaded content can show only in field data.
Why this matters if you plan to show ads
web.dev calls ads one of the largest contributors to layout shift, because ad networks often support dynamic ad sizes. If you add ads to a blog, plan slot sizes and reserved space in the layout from the start, then measure again.
A one-page action list
- Check real-user data for the failing page (or the whole site if data is thin).
- Identify the LCP element and which of the four parts is largest.
- Fix that part using the matching list above.
- Add dimensions or reserved space to everything that loads late.
- Re-measure with real-user data; field data takes time to update, so also compare in a lab tool in the meantime.
Limits
web.dev says it is rare that a quick fix to one part gives a meaningful LCP gain; improvement usually means checking the whole loading process. We have not tested these steps on a client site and make no claims about gains. We did not read web.dev's separate guides for TTFB, images or fonts.
By Omnistu.