Course contentsShow
← Web Development
Lesson 1897 of 2,98235. Web Performance FundamentalsFree lesson

CLS Thresholds and Session Windows

Understanding the 0.1 good threshold and how CLS is measured across page lifetime.

CLS Thresholds and Session Windows

You'll learn: How CLS scores are categorized as good or bad, and how browsers measure layout shifts across your entire page session.

Understanding the 0.1 Threshold

Cumulative Layout Shift uses specific thresholds to rate page stability:

  • Good: CLS ≤ 0.1
  • Needs Improvement: 0.1 < CLS ≤ 0.25
  • Poor: CLS > 0.25

A CLS of 0.1 means content can shift up to 10% of the viewport height (with 100% viewport width affected) and still pass as "good." This threshold balances real-world performance with practical development constraints.

Session Windows: Capturing Shifts Over Time

CLS isn't just measured at page load—it tracks shifts throughout your entire visit. Browsers use session windows to organize these measurements:

A session window is a period of layout shifts with gaps no longer than 1 second between them, capped at a maximum duration of 5 seconds. Think of it like a burst of activity: if shifts happen close together (within 1 second), they're grouped. Once there's a 1-second gap, that session ends.

The browser calculates CLS for each session window, then reports the worst (highest) session window score as your page's CLS. This "maximum session window" approach ensures occasional problematic interactions don't get averaged away.

Why this matters: A page might load perfectly stable (CLS 0), but if a user clicks a button and triggers multiple shifts 3 seconds later, that new session window could produce a poor CLS score. This is why monitoring CLS across the full page lifetime—not just initial load—is critical.

Key Takeaway: CLS scores below 0.1 are considered good, and they're measured using session windows that capture bursts of layout shifts throughout the user's entire page visit, reporting the worst session as the final score.