Products
Features
YouTube Video Summarizer
Summarize YouTube videos
Web & PDF Highlighter
Highlight web pages & PDFs
Chat with PDF
Ask any PDF questions with AI
Ask AI Clone
Chat with your highlights & memories
Audio Transcriber
Transcribe audio files to text
Glasp Reader
Read and highlight articles
Kindle Highlight Export
Export your Kindle highlights
Idea Hatch
Hatch ideas from your highlights
Integrations
Obsidian Plugin
Notion Integration
Pocket Integration
Instapaper Integration
Medium Integration
Readwise Integration
Snipd Integration
Hypothesis Integration
Apps & Extensions
Chrome Extension
Safari Extension
Edge Add-ons
Firefox Add-ons
iOS App
Android App
Discover
Discover
Ideas
Discover new ideas and insights
Articles
Curated articles and insights
Books
Book recommendations by great minds
Posts
Essays and notes from readers
Quotes
Inspiring quotes collection
Videos
Curated videos and summaries
Explore Glasp
Glasp Newsletter
Weekly insights and updates
Glasp Talk
Interview series with great minds
Glasp Blog
Latest news and articles
Glasp Use Cases
Learn how others use Glasp
Build & Support
Glasp API
Access Glasp's API for developers
MCP Connector
Connect Glasp to Claude & ChatGPT
Community
Glasp Reddit Community
Students
Student discount and benefits
FAQs
Frequently Asked Questions
AboutPricing
DashboardLog inSign up

How to Reduce Cumulative Layout Shift for Better UX?

69.4K views
•
October 19, 2021
by
Google Search Central
YouTube video player
How to Reduce Cumulative Layout Shift for Better UX?

TL;DR

To reduce Cumulative Layout Shift (CLS) and improve user experience, define explicit dimensions for images and iframes to prevent unexpected movement. Optimize web font loading and use SVGs instead of icon fonts to minimize shifts. Tools like Lighthouse can help measure CLS, but real-world user data provides the most accurate insights.

Transcript

[MUSIC PLAYING] PATRICK KETTNER: So you know that thing when you start to read a website when all of a sudden, the page just kind of jumps like hundreds or thousands of pixels, and you have no idea where you were? Or when you go to tap on a button, and the button just has a popup that pops up right where your finger is, leaving you desperately smas... Read More

Key Insights

  • Cumulative Layout Shift (CLS) measures the visual stability of a webpage, indicating how much visible content shifts during loading.
  • A good CLS score ensures a stable and predictable user experience, with minimal unexpected layout shifts.
  • CLS is calculated based on the percentage of the viewport affected by layout shifts, with scores ranging from 0 (no shift) to 1 (complete shift).
  • User interactions causing layout shifts have a 500-millisecond grace period before they contribute to the CLS score.
  • Images, iframes, and dynamically loaded content should have explicit dimensions to prevent layout shifts.
  • Web fonts can cause layout shifts; optimizing font loading and using SVGs for icons can mitigate this issue.
  • CLS can be measured using tools like Lighthouse and Chrome DevTools, but real-world user data provides the most accurate insights.
  • Using visibility change events and performance observers in JavaScript can help track and report CLS data effectively.

Install to Summarize YouTube Videos and Get Transcripts

Explore YouTube Video Summarizer or Get YouTube Transcript Extractor

Questions & Answers

Q: What is Cumulative Layout Shift (CLS)?

Cumulative Layout Shift (CLS) is a metric that measures the visual stability of a webpage by tracking how much visible content shifts during the page loading process. It is an important aspect of user experience, as unexpected layout shifts can lead to user frustration. The CLS score ranges from 0 to 1, with 0 indicating no shifts and 1 indicating significant shifts.

Q: How can I achieve a good CLS score?

To achieve a good CLS score, ensure that images, iframes, and dynamically loaded content have explicit dimensions to prevent layout shifts. Additionally, optimize web font loading to reduce shifts caused by font changes. Aim for a CLS score of 0.1 or less for 75% of page views to provide a stable and predictable user experience.

Q: How is CLS measured?

CLS is measured by calculating the percentage of the viewport affected by layout shifts during the page loading process. Tools like Lighthouse and Chrome DevTools can provide CLS measurements, but the most accurate insights come from real-world user data. JavaScript can be used to track CLS data using performance observers and visibility change events.

Q: What factors contribute to layout shifts?

Layout shifts can be caused by images, iframes, and dynamically loaded content lacking explicit dimensions, as well as web fonts loading in a way that changes the layout. User interactions can also cause shifts, but they are given a 500-millisecond grace period before contributing to the CLS score.

Q: How can web fonts cause layout shifts?

Web fonts can cause layout shifts if they are loaded in a way that changes the layout after the initial render. To mitigate this, optimize font loading by preloading essential fonts and using SVGs for icons. Avoid using font display swap, as it can lead to significant layout shifts if fonts load slowly.

Q: What tools can I use to measure CLS?

CLS can be measured using tools like Lighthouse and Chrome DevTools, which provide insights into the visual stability of a webpage. However, real-world user data offers the most accurate measurements. JavaScript performance observers can be used to track CLS data in real-time, providing valuable insights into user experience.

Q: How can JavaScript be used to track CLS?

JavaScript can track CLS by using performance observers to subscribe to layout shift events in the browser. Each layout shift event provides data that can be used to calculate the CLS score. Visibility change events can be used to report CLS data when a page's visibility changes, ensuring that the most accurate data is collected.

Q: What is the importance of a good CLS score?

A good CLS score is crucial for providing a stable and predictable user experience. Unexpected layout shifts can lead to user frustration and negatively impact engagement. By minimizing layout shifts, websites can improve user satisfaction, reduce bounce rates, and potentially improve search engine rankings as part of Google's Core Web Vitals.

Summary & Key Takeaways

  • Cumulative Layout Shift (CLS) is a metric that measures the visual stability of a webpage by tracking layout shifts during loading. A good CLS score ensures a stable and predictable user experience, minimizing unexpected shifts.

  • To achieve a low CLS score, it's crucial to define explicit dimensions for images, iframes, and dynamically loaded content. Optimizing web font loading and using SVGs for icons can also help reduce layout shifts.

  • CLS can be measured using tools like Lighthouse and Chrome DevTools, but real-world user data provides the most accurate insights. JavaScript can be used to track and report CLS data using performance observers and visibility change events.


Read in Other Languages (beta)

English

Share This Summary 📚

Summarize YouTube Videos and Get Video Transcripts with 1-Click

Download browser extensions on:

Try YouTube Summary with ChatGPT & Claude or YouTube Transcript Generator

Explore More Summaries from Google Search Central 📚

English Google Webmaster Central office-hours hangout thumbnail
English Google Webmaster Central office-hours hangout
Google Search Central
English Google Webmaster Central office-hours hangout thumbnail
English Google Webmaster Central office-hours hangout
Google Search Central
English Google Webmaster Central office-hours hangout thumbnail
English Google Webmaster Central office-hours hangout
Google Search Central
Japanese Google Policy Office Hours(Google ポリシー オフィスアワー 2022 年 04 月 28 日) thumbnail
Japanese Google Policy Office Hours(Google ポリシー オフィスアワー 2022 年 04 月 28 日)
Google Search Central
English Google Webmaster Central office-hours from June 9, 2020 thumbnail
English Google Webmaster Central office-hours from June 9, 2020
Google Search Central
How Does COVID-19 Impact SEO Work and Events? thumbnail
How Does COVID-19 Impact SEO Work and Events?
Google Search Central

Summarize YouTube Videos and Get Video Transcripts with 1-Click

Download browser extensions on:

Try YouTube Summary with ChatGPT & Claude or YouTube Transcript Generator

Apps & Extensions

  • Chrome Extension
  • Safari Extension
  • Edge Add-ons
  • Firefox Add-ons
  • iOS App
  • Android App

Key Features

  • YouTube Video Summarizer
  • Web & PDF Summarizer
  • Web & PDF Highlighter
  • Chat with PDF
  • Ask AI Clone
  • Audio Transcriber
  • Glasp Reader
  • Kindle Highlight Export
  • Idea Hatch

Integrations

  • Obsidian Plugin
  • Notion Integration
  • Pocket Integration
  • Instapaper Integration
  • Medium Integration
  • Readwise Integration
  • Snipd Integration
  • Hypothesis Integration

More Features

  • APIs
  • MCP Connector
  • Blog & Post
  • Embed Links
  • Image Highlight
  • Personality Test
  • Quote Shots

Company

  • About us
  • Blog
  • Community
  • FAQs
  • Job Board
  • Newsletter
  • Pricing
Terms

•

Privacy

•

Guidelines

© 2026 Glasp Inc. All rights reserved.