All jobs / Frontend / web developer / Performance

Frontend / web developer interview question · 1–3 years

A late-loading banner pushes content down (CLS). How do you prevent it?

The strongest answer

Reserve space with min-height, aspect-ratio, or a skeleton — or overlay the banner; don't inject unsized blocks above content

Why it works

CLS cares about unexpected movement. Reserved space is the fix; a pretty animation is still a shift.

What a good answer covers

Answers that fall short

Who gets asked this

More Performance questions