Notes from the work

How to fix CLS when your lab score says you pass

How to fix CLS when Lighthouse passes and field data fails: find the worst burst, name the element that moved, then check the element above it.

John KyprianouJohn Kyprianou14 min read

Lighthouse gives the page a green tick for Cumulative Layout Shift. The field data for the same URL says poor. Both are telling the truth.

A lab run only watches the page load. CLS keeps scoring for as long as the tab is open, and it reports the worst burst of movement, not a total or an average. So fixing CLS is mostly diagnosis: find the burst, name the element that moved, then look at the element directly above it.

Two page wireframes side by side, the second with a late ad slot pushing the heading, body text and button down the page, by SEO Turtle

What CLS scores, and why it is a burst

Every unexpected movement of a visible element produces a layout shift score. Google's definition on web.dev is impact fraction multiplied by distance fraction.

Impact fraction is the combined visible area of the unstable elements across the previous frame and the current one, as a fraction of the viewport. Distance fraction is the greatest distance any unstable element moved, divided by the viewport's larger dimension.

The worked example on that page has an impact fraction of 0.75 and a distance fraction of 0.25, which gives 0.1875. That is one shift, and it is already past the 0.1 line for good. Poor is anything greater than 0.25, and the stretch in between needs improvement.

Shifts are then grouped into session windows. A window is a burst of shifts with less than 1 second between them, capped at 5 seconds in total. CLS is the score of the largest window, not the sum of every shift on the page.

Google's write-up on evolving the metric explains the reasoning behind the 5 second cap. With shorter windows, a slower page load could break the shifts into separate windows and improve the score, and the team wanted a window large enough that it did not reward slowdowns. A note added to that post in June 2021 says the new definition is available across Chrome's web tooling surfaces.

The practical reading: one bad second can fail a page that is otherwise still. You are hunting a moment, the same way fixing INP means hunting one interaction.

One exclusion matters. Shifts within 500 milliseconds of user input carry a hadRecentInput flag and can be left out, but the flag is only set for discrete inputs such as a tap, click or keypress. Scrolls, drags and pinch-zoom do not count, so anything that moves while a visitor is scrolling still scores.

Why a Lighthouse pass proves so little

CLS is measured across the entire lifecycle of the page. Google's guide to debugging layout shifts says plainly that Lighthouse can only identify layout shifts that occurred during the initial page load.

Put those two sentences together and the disagreement stops being a mystery. The lab run loads the page and stops. It does not scroll to the embed halfway down or wait for the ad that fills late.

So we treat a Lighthouse CLS pass as evidence that the load is stable and nothing more. It is useful for catching a regression in a template.

Check whether the problem is real first

Start with field data, because that is the only place the full page lifespan shows up. The recommended measure is the 75th percentile of page loads, segmented across mobile and desktop.

Look at the two device types separately. Layouts and ad sizes differ, so a pass on one says nothing about the other.

The quickest way to get both numbers side by side is the Performance panel. According to the Chrome DevTools documentation, opening the panel immediately captures local LCP and CLS and rates them good, needs improvement or bad, and you can fetch field data from the Chrome UX Report in the same view to compare your users' experience with your local metrics.

If the field number is good, stop. If it is poor and your local number is fine, the work is to reproduce what your visitors are doing that you are not. Reading the field data before anyone opens a stylesheet is how we start any technical website audit.

Finding the burst in Chrome DevTools

You cannot fix a shift you cannot reproduce. Google's debugging guide suggests interacting with the site for 5 to 10 minutes with the console open and layout shifts being logged.

A few lines in the console are enough to do the logging:

new PerformanceObserver((list) => {
  for (const entry of list.getEntries()) {
    if (entry.hadRecentInput) continue;
    console.log(entry.value, entry.startTime, entry.sources);
  }
}).observe({type: 'layout-shift', buffered: true});

Then use the page the way a visitor would: scroll to the bottom, open the menu, leave it idle. Throttle the network while you do it, because the same guide notes that a slower connection speed makes layout shifts easier to identify.

For a recorded trace, the Layout shifts tab in the Performance panel holds a table of the captured shifts, including the elements and the scores. The Layout shift culprits insight goes a step further and investigates causes, such as elements being added or removed, or fonts changing as the page loads.

Its list of common culprits is unsized images, injected iframes such as ads, unoptimised animations and web fonts. It may offer a best guess, and Chrome's wording for when it does not is worth remembering: all layout shifts can be mitigated even if no culprit is suggested.

To see the movement on the page itself, switch on Layout Shift Regions under Settings > More Tools > Rendering.

Naming the element in the field

Local reproduction finds the shifts you thought to trigger. Real user monitoring finds the rest.

The raw material is the Layout Instability API. Each LayoutShift entry has sources, value, hadRecentInput, startTime and duration (which is always 0). Each source has a node, a previousRect and a currentRect, so you get the element and where it went.

If every previousRect value is 0, the element shifted into view. If every currentRect value is 0, it shifted out of view.

There is a cap. sources contains at most five entries, and when more than five elements move, the five largest by impact are reported. When one insertion pushes down a whole page of elements, the list is a sample of the victims.

You do not have to wire this up by hand. Since version 3 the web-vitals library has shipped an attribution build, described in Google's guide to debugging performance in the field:

import {onCLS} from 'web-vitals/attribution';

onCLS(({value, attribution}) => {
  sendToAnalytics({
    value,
    target: attribution.largestShiftTarget,
    path: location.pathname,
  });
});

largestShiftTarget is a selector for the element in the largest shift. The same guide recommends capturing the time of that shift and the URL path as well, which matters for single-page apps.

The element that moved is rarely the cause

This is where most CLS work goes wrong. The report names a paragraph, a heading or a footer, and someone starts editing the CSS of that paragraph.

Google's debugging guide is careful here. The element in sources is where to start, but it may be only indirectly related to the cause. In our experience it is almost always the victim: it moved because something else changed size or arrived.

The order of questions the guide suggests is the one we use:

  • Look at the element immediately preceding the shifted element first.
  • Did that element's position or dimensions change?
  • Was an element inserted or removed before the shifted element?

Direction and distance are the other hints. A large downward shift often means something was inserted above. A shift of 1 to 2 px often means conflicting CSS or a web font loading, where the fallback and the final font have slightly different metrics.

One trap sits outside what you can see. The API does not ignore elements that shifted while hidden behind another element. A carousel or a stacked panel rearranging itself under an overlay still scores, and the fix in the guide is to keep hidden layout out of the count with display: none, visibility: hidden or opacity: 0.

The fixes, matched to the cause

Once you know what changed size or arrived, the fix is usually short. The causes below are the ones Google names in its guide to optimising CLS.

Cause What it looks like The fix
Images or video without dimensions Content below jumps down as each file arrives Put width and height on the element, or reserve the box with CSS aspect-ratio. Modern browsers derive a default aspect ratio from the attributes
Ads, embeds and iframes without dimensions A large downward shift, often seconds after load Reserve space with min-height or aspect-ratio, sized to the smallest unit you expect
Dynamically injected content A banner, notice or related-items block pushes the page down with no input from the visitor Reserve the space with a placeholder or skeleton, or overlay the element so nothing below has to move
Web fonts Text reflows by a pixel or two, or a line wraps differently font-display: optional, a sensible fallback stack, the size-adjust, ascent-override, descent-override and line-gap-override descriptors, and <link rel=preload> for critical fonts
Animations that trigger layout Movement during a transition, repeated on every hover or open Animate with transform, using scale() or translate(), in place of height, width, top or left. Respect prefers-reduced-motion

On images, the aspect-ratio: auto keyword lets the real ratio of the file take over once it has downloaded, so reserving space does not lock you into the wrong shape. Dimensions belong in any image SEO checklist.

On fonts, both a flash of unstyled text and a flash of invisible text can shift the layout.

On animations, box-shadow and box-sizing trigger re-layout too, which catches people who assumed only position properties mattered.

One fix is not about any single element. Google calls the back/forward cache a highly effective technique, because a page restored from it is shown without shifts, and says Chrome's 2022 rollout produced noticeable improvements in CLS.

Ad slots, embeds and the collapse problem

Our opinion, stated as one: a reserved slot that sometimes stays empty is better than a slot that collapses, and most teams get this backwards.

An empty box looks like a mistake, so someone writes the code that removes it when no ad comes back. Now every unfilled impression produces a shift, after the visitor has started reading.

Google's guidance points the same way: do not collapse the reserved space when no ad is returned. It also suggests reserving the smallest size you expect and accepting some shift when a larger unit arrives, and placing late-loading content lower in the viewport, where a change moves less of what is on screen.

Third-party frames add a second problem, which is that their shifts are yours. The CrUX methodology states that if an iframe on your page has poor CLS, that CLS is included when measuring the parent page, and iframes are not reported separately.

So an embedded booking widget or review carousel that rearranges itself internally counts against your page. When the field number is poor and nothing of your own moves, look inside the frames before assuming the data is wrong.

Single-page apps and soft navigations

Second opinion: on a single-page app, the shifts worth worrying about happen after a client-side route change, and until recently nobody was measuring those as navigations.

The metric was built around page loads. When a visitor moves from a listing to a product in a single-page app, the content is swapped with no load, and that view has had no CLS of its own in the public dataset.

That is starting to change. The October 2026 CrUX release introduced experimental versions of the Core Web Vitals that include soft navigations, among them experimental_cumulative_layout_shift_with_softnavs. They cover both full page loads and soft navigations, and they are labelled experimental and subject to change.

Until those settle, your own monitoring is the better source, and the URL path you send with every CLS report is what tells you which view the shift happened in. Query strings and fragments are stripped from page URLs in CrUX, so do not expect the public data to separate views that differ only by those.

The causes on a route change are the same ones in the table, with the skeleton screen as the usual suspect. A placeholder that is a different height from the content that replaces it is an injected-content shift on every navigation. Our guide to JavaScript SEO troubleshooting covers the rendering side of the same apps.

Frequently asked questions

What is a good CLS score?

Google treats 0.1 or less as good, above 0.1 and up to 0.25 as needs improvement, and greater than 0.25 as poor. The figure is taken at the 75th percentile of page loads, separately for mobile and desktop. It has no unit, because each shift is scored as impact fraction multiplied by distance fraction, and the page reports its worst burst of shifts.

Why does Lighthouse pass CLS when my field data fails?

Lighthouse can only identify layout shifts that happen during the initial page load. In the field, CLS is measured across the entire lifecycle of the page, so it includes shifts that happen while someone scrolls, when a late ad fills, or when a banner is injected long after load. A lab pass tells you the load is stable. It says nothing about what happens afterwards.

Do layout shifts caused by a click count towards CLS?

Shifts that happen within 500 milliseconds of a discrete input such as a tap, click or keypress are flagged as having recent input and can be excluded. Scrolls, drags and pinch-zoom do not count as recent input, so a shift that happens while someone is scrolling still scores. Content that appears on scroll with no reserved space is a common way to fail.

Will fixing CLS improve my rankings?

Do not build the business case on it. Google says Core Web Vitals are used by its ranking systems, and that there is no single signal because its core ranking systems look at a variety of signals aligned with overall page experience. Fix a layout shift because it makes people tap the wrong thing or lose their place while reading.

What this is worth, in search terms

Not much on its own. Google's page experience documentation says Core Web Vitals are used by its ranking systems. It also says there is no single signal, because its core ranking systems look at a variety of signals that align with overall page experience, and that other page experience aspects do not directly help a page rank higher.

The reason to fix CLS is the person on the page. A button that moves as the thumb comes down, a paragraph that jumps while someone is halfway through it, a form that slides under an ad: those cost enquiries and orders whatever the ranking effect is. For a Cyprus business in a small market, or a UK one paying for every click, there are not many visitors to waste.

The method is the one from our guide on how to fix LCP: diagnose before you edit. If your field data says poor, the lab says pass, and nobody can tell you which element is moving or what is pushing it, that is what our technical SEO service works out. A free SEO review is the quickest way to find out whether you have a real layout shift problem or a green tick that was never looking in the right place.

More on technical seo
John Kyprianou

John Kyprianou

Founder & SEO Strategist

John brings over a decade of experience in SEO and digital marketing. With expertise in technical SEO, content strategy, and data analytics, he helps businesses achieve sustainable growth through search.

Keep reading

More to think about.

All insights
Diagram of Largest Contentful Paint split into Time to First Byte, resource load delay, resource load duration and element render delay, by SEO Turtle

Technical SEO

How to fix LCP: the four phases and which one is actually slow

The standard advice for a slow Largest Contentful Paint is to compress the hero image. Google's own field data says the image download is the shortest of the four phases, even on sites with poor LCP. Here is how to read the four-phase breakdown, find the phase that is eating the time and fix that one, plus what it is worth for rankings.

November 24, 2026
Diagram comparing a country domain, a subdomain and a subfolder as URL structures for an international website, by SEO Turtle

Technical SEO

ccTLD, subfolder or subdomain: choosing a URL structure for international SEO

A country domain per market is the option most businesses get sold, and for a site without much authority to spare it is usually the wrong one. Here is what Google actually documents about ccTLDs, subdomains and subfolders, the registration rules nobody checks, and what it costs to change your mind later.

November 19, 2026
Grid of page cards labelled keep, rewrite and merge above two struck out cards marked 410 gone and one marked 301 target

Technical SEO

Content pruning for SEO: what to delete, redirect or rewrite

Deleting posts does not hand their strength to the ones you keep, and a smaller site is not a better one. Here is how we sort a blog archive into keep, rewrite, consolidate and remove, and why the delete list is usually the shortest of the four.

November 17, 2026
A sitemap.xml file listing URLs with two of them marked by red crosses where the page no longer resolves, by SEO Turtle

Technical SEO

XML sitemap best practices: what Google reads and what it ignores

Almost every XML sitemap in the wild was generated by a plugin and nobody has looked inside it. Google throws away priority and changefreq, treats lastmod with suspicion, and will skip your file entirely if it does not rate your site. Here is what to fix in ten minutes, and what to stop touching.

November 10, 2026
Diagram of a single tap split into input delay, processing duration and presentation delay, showing which phase to fix for INP, by SEO Turtle

Technical SEO

How to fix INP: a debugging order for Interaction to Next Paint

Interaction to Next Paint is usually one slow filter, menu or consent banner, not a slow site. The order that works: confirm the problem in field data, identify the single interaction, read which of the three phases is eating the time, and apply the fix that matches that phase. Plus why none of this is worth doing for ranking points.

October 29, 2026