Notes on building for the open web.
Home / Articles / Performance

Why your CLS moved after launch

Performance

Layout shift often appears after launch, when real content, third-party scripts, or fonts arrive. A design that looked stable in a prototype can move once a banner, a cookie notice, or a late image is inserted above the fold.

Reserve space with aspect-ratio and explicit dimensions. An image without dimensions is a promise the browser cannot keep. The same applies to embeds, ads, and iframes.

Injecting a banner above the fold moves everything below it. Prefer a banner that occupies reserved space, or place it below the first screen. A layout that shifts is a layout that was not planned for the banner.

Track CLS by template, not only site-wide. The average hides the one bad page, and the bad page is usually the one with the most traffic.

Related