Fix layout shift: stop your page from jumping while it loads
You go to tap a button and the page jumps, so you hit something else. That is layout shift. Google measures it with a number called Cumulative Layout Shift, where 0.1 or lower counts as good.
Why it happens
The browser lays out the page before everything has arrived. When an image, an ad, a cookie banner or a late-loading font appears without reserved space, everything below it gets pushed down.
How to measure it
- Open the developer tools (F12) and the Performance tab, record a page load, and look for "Layout Shift" markers.
- Or run Lighthouse from the same tools and read the Cumulative Layout Shift score.
- Test on a throttled connection, where shifts are easier to see.
The usual fixes
- Give images a width and height.
<img src="a.jpg" width="800" height="600">lets the browser reserve the space before the file arrives. With CSS,aspect-ratio: 4 / 3does the same. - Reserve space for banners and embeds. Give the container a minimum height equal to what will load into it.
- Do not insert content above what is already on screen. Put notices in space that already exists, or animate them with a transform.
- Handle fonts. Use
font-display: swapand pick a fallback font close to your real one in size.
Check after you fix it
Reload with the connection throttled and watch the first few seconds. Nothing visible should move after it appears.
Want this checked on your app?
The free quick look and the complete check both measure layout shift while the page loads and report it when it is above Google's 0.1 level.
We email you once when a spot opens. No spam, and you can ask us to remove you any time at support@appinvestigators.com.
Related guides
- Reduce page weight: why your app loads 9 MB and how to fix it
- Fix 200% zoom problems and small tap targets
- Pre-launch checklist for an AI-built app
Last updated 2026-11-24. This guide describes common problems and fixes. It is not a guarantee that any app is secure or free of bugs.