How to check CLS

Record a page load in the Chrome DevTools Performance panel, then read the layout shift track and the CLS value for that session. A load-only trace under-reports it, so scroll and click while recording, and confirm the result against the field CLS for the same URL.

Why check this

CLS is the vital a tester can reproduce and a developer often cannot, because it depends on what the reader was doing when the layout moved. Run it on staging before release, and after any change to advertising slots, fonts, banners or image markup. The failure it prevents is the one users report as a mis-click: the button moves under the finger while a late element pushes the content down.

Prerequisites

Steps

  1. Step 1.

    Scan the served markup for images with no intrinsic size, the most common source of a shift.

    node -e "const html = await (await fetch('https://developer.mozilla.org/en-US/docs/Web/HTTP/Guides/CORS')).text(); const imgs = html.match(/<img[^>]*>/g) || []; let unsized = 0; for (const tag of imgs) { const sized = /\swidth=/.test(tag) && /\sheight=/.test(tag); if (!sized) unsized += 1; console.log(sized ? 'sized  ' : 'unsized', (tag.match(/src=\"[^\"]*\/([^\"\/]+)\"/) || [])[1]); } console.log('img', imgs.length, '| unsized', unsized);"
    
    unsized fetching-page-cors.svg
    unsized simple-request.svg
    unsized preflight-correct.svg
    unsized include-credentials.svg
    img 4 | unsized 4

    This is the pre-filter, and it finds candidates only. A missing width or height attribute is a risk, not a shift. The browser decides.

  2. Step 2.

    Open the URL in Chrome, press F12, go to the Performance panel and click the reload and record button. Read the CLS value and the layout shift entries on the timeline.

    CLS  0.00

    Four unsized images, and the recorded load shifted nothing measurable.

  3. Step 3.

    Record a second trace and use the page while it records. Scroll to the bottom, open every menu, click the controls a reader clicks. Stop the recording and read CLS again.

    The number from this run is the one to report. A load-only trace ends before most shifts happen.

  4. Step 4.

    Read the field CLS for the same URL, from the field section of the Performance panel or from PageSpeed Insights.

    CLS  0.05  (p75 of real Chrome users, scope: url)

How to read the result

| What you see | What it means | What to do | | --- | --- | --- | | Lab CLS 0.00 and field CLS 0.05 | Real sessions shift, your load-only trace did not | Re-record while scrolling and clicking, then compare again. | | CLS rises at one point on the timeline | One element moved the content | Click the shift entry, read the moved node, fix that node. | | CLS is 0 on desktop and fails on mobile | The narrow layout is the one that reflows | Re-run with device emulation before closing the ticket. | | Unsized images in step 1, CLS still 0 | The elements were reserved space by CSS instead | Leave them. Record the reason in the ticket so nobody re-opens it. |

Common mistakes

Sign: The markup scan lists four unsized images and the trace still reports CLS 0.00.Cause: An attribute scan finds candidates, not shifts. Space can be reserved by an aspect ratio in CSS, or the element may never paint inside the viewport during the run. The scan narrows the search, the trace decides.
Sign: CLS is 0.00 in every recording and above zero in the field.Cause: A load-only trace never scrolls, never clicks and never opens a menu, so shifts that follow an interaction fall outside it. CLS keeps accumulating for the whole life of the page, while the trace covers a few seconds of it.
Sign: A developer cannot reproduce the shift you filed.Cause: Layout shifts depend on viewport width, font loading order and network timing. A report without the viewport size, the device mode and the step that triggered the shift is not reproducible, whatever the CLS number says.

Thresholds

CLS 0.1 or less

Measured at the 75th percentile of page loads, segmented across mobile and desktop devices. The capture above read 0.05 in the field, inside the threshold.

Source: web.dev, Web Vitals, https://web.dev/articles/vitals

What to check next

FAQ

How to check CLS in Chrome?

Performance panel, reload and record, then read the CLS value and the layout shift entries. Each entry links to the node that moved. Record a second trace while you use the page, because a recording that only loads it ends before most shifts happen.

Why does CLS differ between PageSpeed Insights and Search Console?

They report different things. PageSpeed Insights gives you a lab run plus field data for one URL, while Search Console groups similar URLs and reports the group. A URL inside a failing group can measure well on its own.

Does setting width and height on images fix CLS?

It removes one cause. The browser reserves the box before the bytes arrive, so nothing below the image moves. Fonts, injected banners, and content that loads after a click cause shifts that no image attribute touches.

Can I measure CLS without a browser?

No. CLS is computed from paint positions, which only a rendering engine has. A markup scan such as step 1 lists suspects and nothing more.

Verified

The browser figures above come from one Chrome DevTools capture of https://developer.mozilla.org/en-US/docs/Web/HTTP/Guides/CORS on 2026-09-11, on one machine, with no CPU and no network throttling. That capture recorded a page load with no interaction. Read your own Chrome build from chrome://version and record it with your own numbers.

Verified by Maks Vernynode 22.23.2

Each output block is what the command above it printed on that date, on the host named in the step. Figures read from a live site move between runs. Compare the shape of the answer rather than the digits, and see the methodology for how a page is re-verified.

intermediate10 minpublished updated Maks Verny