The problem

Cumulative Layout Shift (CLS, how much visible content moves after it first appears) failed on Home for phone users in every market. Most of it, 0.085 of 0.104, came from one element: the banner inviting visitors to open the app. A page without the banner measured 0.

Why the obvious fix does not work

The banner mounted in the browser, after checks on the device, a cookie and a ratings request. The obvious answer is to render it on the server. But the Home document is cached at the edge and one copy serves every visitor for 15 minutes, so the server cannot decide per person whether the banner applies.

What I changed

The server now always renders the banner, so its space is part of the page from the first byte. A few lines of inline script, placed inside the banner, run the per-visitor decision before the browser paints and hide it for people who should not see it. After the page becomes interactive, the regular code takes over.

Nothing moves for anyone: visitors who get the banner see it in place from the first frame, and visitors who do not never see it at all.

The result

On Home with a 4× CPU slowdown, the main branch shifted by 0.085 in every run and the fix by 0 in every run.

This is a lab result. The field number moves over the following 28 days as Chrome's public data rolls forward.