What Causes Layout Shift (CLS) on an Online Store?
Layout shift (CLS) on an online store comes from content that appears or changes size after the page starts to render: product images and videos without set dimensions, late promo and cookie banners, review widgets, A/B test changes, swapping web fonts, recommendation carousels and sticky bars that push content down instead of overlaying it.
Last updated November 17, 2026
Cumulative Layout Shift (CLS) is the Core Web Vital that measures how much visible content moves around without warning. On a store, that is the add-to-cart button that slides away as a review widget loads, or the product grid that drops when a sale banner appears. This post covers what causes layout shift on ecommerce sites, where each cause shows up, how to spot it and how to prevent it.
Key takeaways
- Google's web.dev guidance treats a CLS of 0.1 or less as good and more than 0.25 as poor, at the 75th percentile of real page loads.
- Most store layout shift comes from things added late: banners, review and UGC widgets, test variations, carousels and sticky bars.
- Shifts within 500 milliseconds of a click or tap are excluded, so a cart drawer opened by a shopper usually does not count, but scrolling does not excuse a shift.
- Lab tools like Lighthouse mostly see the initial load, so real-shopper field data often shows more CLS than a lab test.
- The prevention pattern is the same for every cause: reserve the space up front, or overlay the element so it never moves the page.
Part of: Noibu's Performance Agent
What is layout shift, and what counts as a good CLS score?
A layout shift happens when an element that is already visible changes position from one rendered frame to the next. CLS adds up those shifts, weighted by how much of the screen moved and how far it moved. Google's web.dev documentation on CLS sets the thresholds: 0.1 or less is good, more than 0.25 is poor, and the band between is rated as needing improvement. The score is taken at the 75th percentile of page loads, split by mobile and desktop, so three in four visits need to meet the target.
CLS is not a simple total for the whole visit. Shifts are grouped into session windows: a burst of shifts with less than one second between them, capped at five seconds per window. The page's CLS is the largest window. That means one bad burst, such as a banner, a widget and a font all landing in the same second, decides the score. How CLS sits next to LCP and INP for revenue is covered in Core Web Vitals for ecommerce: which ones actually move conversion.
What causes layout shift on an online store?
Google's guide to optimizing CLS names four common causes: images without dimensions, ads, embeds and iframes without dimensions, dynamically injected content, and web fonts. Online stores have all four, plus a stack of apps that add content after the theme has rendered. The causes below are the ones that show up most on ecommerce templates.
Images and video without dimensions
When a product image or video has no width and height, the browser reserves no space for it. Text, prices and buttons render first, then jump down when the file arrives. Product galleries, collection grids and hero banners are the usual places. The same problem affects lifestyle video and embedded social posts on landing pages.
Late promo, announcement and cookie banners
Banners that a script adds to the top of the page after the first paint push everything below them down. Free shipping bars, sale countdowns, geolocation prompts and consent banners are common offenders on stores, and because they sit at the top, they move the whole viewport. A banner placed in the page flow shifts content; the same banner shown as an overlay does not.
Review, UGC and app widgets
Review stars under the product title, photo review galleries, size guides, payment messaging and loyalty prompts often load from third-party apps after the page renders. Each one that loads above the add-to-cart button pushes the button down, sometimes just as a shopper reaches for it.
A/B test injections
Client-side testing tools change the page after it renders. A variant with a longer headline, a taller image or an extra trust badge can move everything below it. Hiding the page until the test loads trades layout shift for a slower page, as explained in will A/B testing make my site flicker or slow down.
Web fonts
The web.dev CLS documentation notes that fonts which render larger or smaller than their fallback cause shifts. When a brand font replaces the fallback font in product titles, prices or navigation, lines rewrap and the content below moves.
Ads and recommendation carousels
Recommendation carousels such as you may also like or recently viewed often load after a separate request. If the slot has no reserved height, the page grows when products arrive. If the slot is reserved but nothing returns, collapsing it shifts the page too. Retail media ads on category pages behave the same way.
Sticky add-to-cart bars and cart drawers
Sticky bars that appear after a shopper scrolls past the buy button can count against CLS. Scrolling is not treated as recent input, so a bar that is added to the page flow during a scroll shifts content and is scored. Cart drawers and mini-cart counts are usually fine when they open right after a click, but a slow cart response that resizes the header seconds later is not.
| Cause | Where on the store | How to spot it | How to prevent it |
|---|---|---|---|
| Images and video without dimensions | Product galleries, collection grids, hero banners, lifestyle video | Content below the image jumps once the file loads; Lighthouse flags unsized images | Set width and height attributes or CSS aspect-ratio on every image and video |
| Late promo and announcement banners | Top of every page, free shipping bars, sale countdowns | The whole page drops down a strip after the first paint | Render the banner in the server HTML, or reserve its height before it loads |
| Cookie and consent banners | First visit on every template | Header and hero shift when a banner is added into the page flow | Overlay the banner with fixed positioning instead of adding it above content |
| Review and UGC widgets | Product pages under the title or price, photo reviews | Star ratings and review blocks pop in and push the add-to-cart button | Give the widget container a min-height that matches its loaded size |
| A/B test injections | Any page running a client-side test | Headlines, buttons or blocks change size after the test script runs | Run tests server-side or at the edge, or keep variants the same size as the original |
| Web fonts | Product titles, prices, navigation | Text reflows when the web font replaces the fallback | Preload key fonts, use font-display: optional, match fallback metrics with size-adjust |
| Ads and recommendation carousels | Home page, product pages, cart | Empty space grows, or content jumps when products return or collapses when none do | Reserve a fixed-height slot and keep the slot filled with a skeleton if nothing returns |
| Sticky add-to-cart bars | Mobile product pages after scrolling | Content jumps as the bar is added while the shopper scrolls | Use position: fixed or sticky so the bar overlays content and never takes space in the flow |
| Cart drawers and mini-cart updates | Header cart count, slide-out cart | Header or page content moves after an add-to-cart response arrives late | Animate drawers with transform, and keep the cart count area a fixed width |
Which layout shifts do not count toward CLS?
Not every movement is scored. Per the web.dev CLS documentation, shifts that happen within 500 milliseconds of user input are flagged and left out of CLS. That covers discrete inputs such as clicks, taps and key presses. Scrolling, dragging and pinch-zoom are not treated as recent input, so a shift that happens while a shopper scrolls still counts.
Animations built with CSS transform do not trigger layout shifts either, because they move an element without changing the layout around it. That is why a cart drawer that slides in with a transform after a tap is usually harmless, while a promo bar that animates its height from zero is not.
Why does Lighthouse show less layout shift than real shoppers see?
Lighthouse and other lab tools load a page once in a controlled environment and mostly measure the initial load. The web.dev documentation notes that lab tools can report lower CLS than real users experience. Real shoppers scroll, wait, accept cookies, trigger sticky bars and see personalized widgets, and CLS in field data is measured across the full life of the page.
So a store can pass in Lighthouse and still fail CLS in Search Console. Treat field data from real shoppers, split by template and device, as the source of truth, and use lab tools to debug a specific page. The difference is covered in detail in why your Lighthouse score differs from real-user Core Web Vitals.
How do you find which element is shifting?
Start from the template with the worst field CLS, then reproduce the shift on that page. The Performance panel in Chrome DevTools shows a Layout Shifts track with the elements that moved, and the web-vitals JavaScript library can report the shifted element from real visits. Work through the steps below in order.
How to track down a layout shift on a store
- 1
Check field CLS
Look at real-shopper CLS by page template and device, at the 75th percentile, to see where shifts actually hurt.
- 2
Pick the worst template
Product and collection pages on mobile are the usual suspects because they carry the most widgets and apps.
- 3
Record the page
Use the Layout Shifts track in Chrome DevTools to see which elements moved and when.
- 4
Name the culprit
Match each shifted element to its source: an image, a banner, an app widget, a font or a test script.
- 5
Reserve or overlay
Give the late element its space up front, or take it out of the page flow.
- 6
Measure again
Compare field CLS for that template after the change ships, not just a single lab run.
How do you prevent layout shift without removing banners and widgets?
Every fix follows one of two patterns: reserve the space before the content arrives, or take the content out of the page flow so it never pushes anything.
- Size every image and video: add width and height attributes or a CSS aspect-ratio so the browser holds the space, including inside galleries and carousels.
- Reserve space for app widgets: give review, recommendation and payment messaging containers a min-height that matches their loaded size, and keep a skeleton block if nothing returns.
- Overlay, don't push: show cookie banners, chat prompts and sticky add-to-cart bars with fixed or sticky positioning so they cover content rather than move it.
- Render banners on the server: put promo and announcement bars in the initial HTML, or reserve their height, instead of adding them with a script.
- Steady the fonts: preload the fonts used above the fold, use font-display: optional, and match fallback metrics with size-adjust.
- Keep test variants the same size: run tests server-side where you can, and design client-side variants to match the original element's dimensions.
- Animate with transform: slide drawers and menus in with transform rather than changing height, top or left.
Fixing CLS often helps the other two Core Web Vitals as well. Reserving image space pairs naturally with loading the main product image first, covered in how to improve LCP on ecommerce product pages, and trimming heavy app scripts also helps responsiveness, covered in how to improve INP on an ecommerce site.
How does Noibu's Performance agent work on layout shift?
Noibu's Performance agent measures Core Web Vitals, including CLS, from real shopper traffic rather than a single lab run. It ranks your worst-performing page groups, so a product template that shifts badly on mobile surfaces on its own, identifies the root cause, and stages a change for your review. Nothing goes live until your team approves it, and the agent then measures the result against real shopper data. More detail is in Noibu's Performance agent for Core Web Vitals and site speed.
Every Noibu agent runs the same loop: find, build, your approval, ship, measure and compound, so each approved change sharpens the next. The Performance agent is one of six supervised agents, alongside Bug Resolution, CRO, ADA, A/B Testing and ROAS, and they work in the Noibu console and in AI tools such as Claude through Noibu MCP.
The short version
Layout shift on an online store comes from content that arrives late or changes size: unsized images, banners, review widgets, test variations, fonts, carousels and sticky bars. Reserve the space or overlay the element, then confirm the change with real-shopper CLS by template and device. To see which of your page groups are slowest and least stable for real shoppers, start with Noibu's free website audit.
Noibu is AI for ecommerce operations, the always-on optimization system that keeps online stores running at their best. A team of supervised AI agents finds what's broken, slow, or leaking revenue, does the work, and hands results back for human approval. Trusted by retailers like Free People, Guess, Liquid I.V., and Ariat.
Frequently asked questions
What is a good CLS score for an ecommerce site?
Google's web.dev guidance treats 0.1 or less as good and more than 0.25 as poor. The score is measured at the 75th percentile of page loads, split by mobile and desktop.
What is the most common cause of layout shift on online stores?
On many stores it is content added after the first paint: images without set dimensions, app widgets such as reviews, and banners added to the top of the page. Check your own field data, because the worst offender varies by theme and app stack.
Does a cart drawer opening count toward CLS?
Usually not. Shifts within 500 milliseconds of a click or tap are excluded from CLS. A drawer that appears much later, for example after a slow cart response, or one that pushes the page instead of overlaying it, can still add to the score.
Why is my CLS fine in Lighthouse but poor in Search Console?
Lighthouse mostly measures the initial load in a lab. Search Console uses field data from real visits across the full life of each page, including shifts caused by banners, widgets and sticky bars after load or during scrolling.
Can A/B testing tools cause layout shift?
Yes. Client-side tests that change headlines, images or blocks after the page renders can move content. Server-side tests or variants that keep the same size as the original avoid most of it.
How does Noibu's Performance agent help with CLS?
Noibu's Performance agent measures Core Web Vitals, including CLS, from real shopper traffic, ranks your worst-performing page groups, identifies the root cause and stages a change for your review before anything goes live.
