WINDWARE.DEV · WEB DESIGN & DEVELOPMENT
Journal
·6 min read

Reserve Space Before Content Shifts

Unexpected layout shifts make pages feel unstable. How Cumulative Layout Shift is measured, what web.dev recommends, and what the 2024 Web Almanac shows about progress on the live web.

Windware Studio· Design & Development Team

A visitor starts reading a headline. An image finishes loading above the fold. The text jumps. The button they were about to tap moves. That moment is not a vague “feels slow” complaint—it is a measurable stability failure. Cumulative Layout Shift (CLS) exists to quantify how often unexpected movement of visible content disrupts the page.

Google’s web.dev documentation defines CLS as a Core Web Vital that measures visual instability by combining how much of the viewport was affected with how far unstable elements moved. Unlike timing metrics reported in seconds, CLS is a unitless score. Sites should aim for 0.1 or less at the 75th percentile of visits; values above 0.25 are labeled poor.


What CLS is measuring

web.dev describes CLS as the largest burst of layout-shift scores for unexpected shifts during the page’s life. Shifts that follow recent user input are treated differently from shifts the page causes on its own. The Layout Instability API (documented on MDN as LayoutShift) reports when a visible element changes position between frames and exposes a score built from impact and distance fractions of the viewport.

In plain terms: the metric asks whether the page rearranged itself while someone was trying to use it. A useful physical analogy is a restaurant menu that reprint mid-order—the content may improve, but the sudden reflow breaks the act of choosing.


Why shifts happen—and how to prevent them

web.dev’s optimization guidance clusters around a few recurring causes:

  1. Unsized media — Images and videos without reserved dimensions often start at zero height, then expand when intrinsic size is known. Set width and height attributes, or reserve space with CSS aspect-ratio (or equivalent).
  2. Late-injected blocks — Ads, embeds, iframes, and other dynamically inserted content push neighbors down. Prefer known sizes, min-height placeholders, or placement lower in the viewport when space cannot be reserved.
  3. Fonts and animation choices — Font swaps and layout-inducing animations can contribute; prefer transforms/opacity for motion and plan font loading so text does not reflow violently.
  4. bfcache eligibility — web.dev notes that keeping pages eligible for the back/forward cache is a highly effective way to keep CLS low on history navigations, because the snapshot restores without replaying load-time shifts.

HTTP Archive’s Web Almanac 2024 Performance chapter reports that CLS continued to improve across the web: about 72% of desktop and 79% of mobile sites achieved a good CLS in 2024, up from roughly 60% in 2020. The Media chapter adds a concrete adoption gap: authors should set width and height so browsers can reserve space, yet those attributes were still used on only about one-third of images—meaning many pages still leave height intrinsic and risk a second layout pass when the file loads.

That combination is useful for studio work. The metric thresholds come from web.dev; the field evidence that sizing practice remains incomplete comes from the Almanac’s crawl of the live web. Progress is real; the remaining opportunity is still large and mostly mechanical.

Source of shiftTypical failurePractical fix
Images / videoHeight discovered after loadExplicit dimensions or aspect-ratio
Embeds / adsEmpty slot grows lateReserve min-height / known slot size
Injected UIBanner inserts at topPrefer lower placement or reserved region
History navReload rebuilds layoutKeep pages bfcache-eligible where possible

Limits worth keeping visible

CLS is not a full quality score for a website. A page can meet the 0.1 threshold and still bury its offer, fail accessibility checks, or load heavy scripts. web.dev also notes that some motion is intentional: gradual, expected transitions can help orientation, while abrupt jumps usually do not. The metric targets unexpected instability, not every change on screen.

Lab tools help reproduce shifts, but field percentiles still decide Core Web Vitals outcomes. Debug with the Layout Instability API and browser performance traces, then verify that reserved space matches real content—not optimistic placeholders that collapse or overflow later.


What to do on the next build

  1. Audit above-the-fold media for missing width/height or aspect ratio.
  2. Reserve space for known late blocks (forms widgets, embeds, cookie bars) before they hydrate.
  3. Avoid inserting high-impact content at the top after first paint when you cannot reserve space.
  4. Animate with transform/opacity rather than layout properties when motion is required.
  5. Spot-check CLS in the field (CrUX / RUM) after shipping, not only in a quiet lab load.

The next step is operational consistency: treat reserved space as part of the design system for components that load asynchronously, so marketing embeds and CMS images do not quietly undo an otherwise stable template.


Ready to Discuss Your Website?

If you are planning a new website, a service redesign, or custom development for your business, we’re here to help shape the work.