DEV Community

Cover image for What is CLS(Cumulative Layout Shift) the main part of Google Core Web Vitals?
Zain Muhammad
Zain Muhammad

Posted on

What is CLS(Cumulative Layout Shift) the main part of Google Core Web Vitals?

CLS is the main part of Google Core Web Vitals.
CLS is a measure of the largest burst of layout shift scores for every unexpected layout shift that occurs during the entire lifespan of a page.

A layout shift occurs any time a visible element changes its position from one rendered frame to the next.

A burst of layout shifts, known as a session window, is when one or more individual layout shifts occur in rapid succession with less than 1-second in between each shift and a maximum of 5 seconds for the total window duration.

The largest burst is the session window with the maximum cumulative score of all layout shifts within that window.

**

What is a good CLS score?

**
To provide a good user experience, sites should strive to have a CLS score of 0.1 or less. To ensure you're hitting this target for most of your users, a good threshold to measure is the 75th percentile of page loads, segmented across mobile and desktop devices.

Image description

Top comments (0)