How to fix layout shift (CLS): the page jumping as it loads
Quick answer
Google's "good" is CLS ≤ 0.1. Give every image and embed width and height (or aspect-ratio); reserve space for anything added after load (banners, cookie bars, ads) or overlay it instead of pushing the page; use font-display: swap with a fallback font of similar size.
The details
| Cause | What happens | Fix |
|---|---|---|
| Images with no width/height | The page reflows when each image arrives | width and height attributes on every img |
| Banner or cookie bar inserted at the top | Everything below jumps down | Reserve its height, or position it over the page |
| Web font swap | Text reflows when the font arrives | A close fallback font; size-adjust |
| Embeds (maps, videos, widgets) | Grow from 0 to full height | A box with a fixed aspect-ratio |
What usually goes wrong
- Fixing CLS in the code but never measuring it on a slow phone, where late content arrives later.
- Lazy-loading images without sizes.
From Palm's tests
In Palm's site-speed test, both sides got CLS to 0 (it can be read from the code); the difference was the largest paint, which needs measuring.
What your agent can't do alone
Palm's site-speed (Pro) measures layout shift in Chrome on a throttled phone and names the elements that moved.
Questions
What is a good CLS score?
0.1 or less for 75% of visits.