The Cumulative Layout Shift (CLS) represents the visual stability of a website. A shift in a layout can occur any time when a visible element changes its position from one rendered frame to the next.
Focus on these to improve CLS 🏆👇
1️⃣ Add Dimensions for Image and Video Elements:
Always include size attributes on images and video elements, or provide the necessary space with a CSS aspect ratio box.
2️⃣ Avoid Dynamically Injected Content:
If it's necessary for you to use Dynamic Content, reserve enough space in advance according to the size of that Dynamic Content in the viewport. So that when it loads, it does not cause Cumulative Layout Shift.
3️⃣ Reduce Image Size:
Normally, images represent the majority of bytes transferred on a website page, in addition to occupying a large visual space. Therefore, they can directly impact the load time of the site.
Follow us for more interesting and Useful information on CWV.
• • •
Missing some Tweet in this thread? You can try to
force a refresh