Performance Theoretical 2 - CLS

Understanding Cumulative Layout Shift (CLS)

CLS measures visual stability by tracking unexpected layout shifts. A good CLS score is below 0.1.

This text will shift repeatedly!

Image 1

More shifting text...

Image 2

Even more shifting text!

Image 3

How to Fix CLS:

  1. Always specify image dimensions
  2. Reserve space for dynamic content
  3. Avoid inserting content above existing content