How-to Guide

Layout Shift: Fixing a Practice Page That Jumps While Loading on a Phone

Short answer

A page jumps when pictures, fonts or widgets arrive late and push the text down. Give every image a width and height, reserve space for embeds and banners, and load fonts early. Google calls the problem layout shift and treats a score of 0.1 or lower as good.

By Gio LaRocheUpdated 5 min read
Get my free auditor call (561) 291-2681

The page that moves under your thumb

You are about to tap Request an Appointment and the page slides down because a photo finished loading above it. You tap the privacy link instead. This is layout shift, and it is more than a nuisance on a practice site. A patient who taps the wrong thing on a small screen may simply leave.

Google's web.dev team describes the cause in its Cumulative Layout Shift article, which we read before writing. Unexpected movement happens when images or videos have no set dimensions, when fonts render larger or smaller than their stand-ins, and when third-party ads or widgets resize themselves. It also notes that these problems are worse for real visitors than in a developer's test, because test images are often already in the browser's memory.

The number to know

Cumulative Layout Shift scoreWhat Google's guidance calls it
0.1 or lowerGood
Between 0.1 and 0.25Needs improvement
Above 0.25Poor

web.dev recommends measuring the 75th percentile of real page loads, split by phone and desktop. In plain words, that means most of your visitors, not only the lucky ones on fast connections. Search Console's Core Web Vitals report shows these numbers for pages with enough traffic, and our Core Web Vitals checklist shows where to find them.

The four fixes that cover most practice sites

  1. 1Give every image width and height attributes. The web.dev guidance says to always include them on image and video elements, or reserve the space with the CSS aspect-ratio property, so the browser holds the right amount of room while the file downloads.
  2. 2Reserve space for anything that loads late: a map, a booking widget, a review feed or a cookie banner. A fixed-height box the same size as the finished item stops the content below from moving.
  3. 3Do not insert new content above what the visitor is already reading. A banner that slides in at the top pushes everything down, so place it in space that was already set aside or overlay it.
  4. 4Load fonts early and choose a fallback that is close in size, so the swap does not reflow the text. Our guide on custom web fonts goes through this.

Animation is a special case

web.dev explains that animations using transform, which slide or scale an element, do not push other elements around, so they do not count toward layout shift. Animations that change an element's height or position in the flow do count. If your theme animates a section opening, ask for a transform-based version.

Find which element is jumping

  1. 1Open the page in Chrome and right-click, then choose Inspect, and open the Lighthouse tab. Run a mobile report.
  2. 2Under diagnostics, look for the audits on images without dimensions and on layout shift elements. Each lists the offending items.
  3. 3Note that web.dev warns the listed elements are often the ones moved, not the one that caused the move. If a new box was added above, the items beneath it will appear in the list.
  4. 4Fix the top item, run the report again and compare. Record the before and after scores in your monthly notes.

Test on a real phone as well, on mobile data rather than office Wi-Fi. If the page is still moving, our guide on lazy-loading images below the fold and the one on resizing photos before upload cover the remaining image causes. Rotate the phone during the test as well, because a booking page that still works when the phone is turned sideways should not jump or lose entries.

Frequently asked questions

What is a good layout shift score?

web.dev says to aim for 0.1 or lower, measured at the 75th percentile of page loads on phone and desktop. Above 0.25 it counts as poor.

Why do images need a width and height?

Without them, the browser does not know how much room to leave until the file arrives, so everything under the picture jumps. With them, space is held in advance.

Will fixing this raise our rankings?

We cannot promise that. Layout stability is part of Google's Core Web Vitals, and a page that stays put is easier to use, which is reason enough to fix it.

Does the cookie banner cause shifts?

It can, if it pushes the page down when it appears. Overlay it at the bottom of the screen or reserve its space from the start.

Where do I see real visitor data?

In Search Console under Core Web Vitals, for pages with enough traffic. Smaller sites may see only lab results from a Lighthouse test.

Sources

Keep reading

Ready to Grow Your Practice?

Primara is now accepting new independent practices nationwide. Most new engagements begin within one week.

Send Us a Message

We respond within one business day.

* Required field

We'll call to confirm your consultation.

No spam, ever. HIPAA-aware agency. We respond within one business day. For urgent inquiries, call (561) 291-2681.

Founder-LedHIPAA-AwareServing Practices Nationwide