Cumulative Layout Shift (CLS) for Trades Websites: Stop Your Page From Jumping

Cumulative Layout Shift (CLS) for Trades Websites: Stop Your Page From Jumping

You are about to tap Call now and the page jumps. That is layout shift, and it is measured. This guide explains CLS, its thresholds and the causes web.dev lists, with fixes for a trades site.

I am Robiul Alom Ronju, Founder of Nexranking. The figures and rules below come from the pages linked in Sources. My own advice is marked as mine.

Cumulative Layout Shift (CLS) for UK trades websites: thresholds and fixes
Built from web.dev guidance.

What CLS measures

Cumulative Layout Shift measures how often visitors see unexpected movement of visible content. It uses the largest burst of layout shifts over the life of the page and ignores shifts that users expect, such as those that follow a tap.

How the score works

A layout shift happens when a visible element changes its start position between frames. Each shift’s score is the impact fraction times the distance fraction. Shifts less than 1 second apart are grouped into session windows capped at 5 seconds, and CLS is the highest-scoring window. Shifts within 500 ms of a tap, click or key press are excluded.

The thresholds

Good is 0.1 or less. Needs improvement is between 0.1 and 0.25. Poor is more than 0.25, measured at the 75th percentile of page loads, separately for mobile and desktop.

Causes web.dev lists

  • Images or videos without known dimensions.
  • Fonts that render larger or smaller than the fallback font.
  • Third-party ads or widgets that resize themselves.
  • Content that loads late or is inserted above existing content.

Trades examples

This is my own list. A cookie banner that pushes the page down, a review widget that loads late, a hero image with no set size and a sticky call bar that appears after a second are the usual causes.

Fixes

  • Set width and height, or reserve space, for every image, video and embed.
  • Reserve space for banners and widgets before they load.
  • Show a loading state when a tap loads new content.
  • Animate with CSS transform instead of changing width, height, top or left.
  • Respect the reduced motion setting.

How to check

Open the page on a phone with a slower connection and watch for movement. In Search Console, the Core Web Vitals report groups affected pages, see the report guide. For image sizes, read image SEO for trades.

Cookie banners and sticky bars

Cookie banners and sticky bars are a common reason for shifts on trades sites. Reserve their space, or overlay them at the bottom of the screen so they do not push content. This is my own advice. Check the page again after any change to the banner plugin, because an update can reset its settings.

A worked example

Illustrative example, not a client case. A cleaner’s site has a CLS of 0.31 on mobile. The hero image has no set size and a review widget loads late above the call button. She sets image dimensions, reserves a fixed-height block for the widget and moves the cookie banner to the bottom of the screen. CLS falls under 0.1.

Mistakes I see

  • Images with no width and height.
  • Pop-ups that push content down.
  • Late-loading widgets above the fold.
  • Animating the position of buttons.
  • Testing only on a fast desktop.

Next, read lab and field data and ask for an audit.

What is a good CLS?

Web.dev says 0.1 or less.

Do shifts after a tap count?

Shifts within 500 ms of a tap, click or key press are excluded.

Why do images cause shifts?

If the browser does not know the size, content moves when the image loads.

Does CLS differ by device?

Web.dev measures mobile and desktop separately.

Sources