Cumulative Layout Shift: What It Is and How to Measure It - Deepstash
Cumulative Layout Shift: What It Is and How to Measure It

Cumulative Layout Shift: What It Is and How to Measure It

Curated from: blog.hubspot.com

Ideas, facts & insights covering these topics:

11 ideas

·

37 reads

2

Explore the World's Best Ideas

Join today and uncover 100+ curated journeys from 50+ topics. Unlock access to our mobile app with extensive features.

Cumulative Layout Shift

Cumulative Layout Shift is one of these key metrics that measures the “jumpiness” of a website and how it unexpectedly moves as elements load. Let’s take a closer look at how this metric works, and how you can make sure your own website is following best practices so you rank higher on search engines and provide your users with a better experience.

3

6 reads

Defining Cumulative Layout Shift

Cumulative Layout Shift (or CLS) is a measure of how much a webpage unexpectedly shifts during its life. For example, if a website visitor loaded a page and, while they were reading it, banner loads and the page jumps down, that would constitute a large CLS score.

Along with Largest Contentful Paint (the amount of time it takes to load the largest piece of content) and First Input Delay (how long it takes for a page to be interactive or “clickable”), CLS is part of Google’s Core Web Vitals. Google’s web crawlers measure CLS on each page they index.

3

3 reads

Cumulative Layout Shift: Causes

Page shifts happen when content loads at different speeds and causes the layout to change and alters what the viewer is looking at. Advertisements loading slowly, videos of unknown size suddenly appearing, or DOM elements being dynamically added are all potential causes of CLS.

3

4 reads

Cumulative Layout Shift: Importance

Jumpy websites that load in pieces or with unexpected behavior will cause your visitors to find another website to browse. And if they do stick around, a high CLS score is likely to cause usability problems like choosing the wrong option, checking out too early, or missing parts of your website altogether.

This problem is only exacerbated by the large number of internet users who are browsing on their smartphones. When viewing your site on a small screen, any jumps and layout shifts on the website are certain to have a big impact on mobile user experience.

3

3 reads

Measuring Cumulative Layout Shift

The good news is that you don’t have to measure CLS yourself because Google makes it really easy to analyze your page performance with their PageSpeed Insights tool, or in the Chrome browser using Lighthouse Tools.

To analyze performance in PageSpeed Insights:

  • Enter a website URL into Google's PageSpeed Insights tool.
  • Click 'Analyze.'
  • Check your performance. You can review both mobile and desktop performance, which you can switch between using the top left corner navigation.

3

3 reads

Lighthouse Analysis

  • Open up the website you want to analyze in Chrome.
  • Navigate to Developer Tools by clicking the three dots in the top right corner of the browser window, choosing “More Tools” and then “Developer Tools.”
  • When the console opens, choose “Lighthouse” from the options along the top.
  • Click “Generate Report.”

3

3 reads

Impact Fraction and Distance Fraction

These are the two variables that Google uses to calculate CLS in the formula below:

layout shift score = impact fraction x distance fraction

  • Impact fraction relates to the size of the unstable element in comparison to the viewport.
  • Distance fraction is the amount the unstable element moves as a ratio of the viewport.

So a high CLS would consist of a large element moving a long distance. A small CLS would be the result of a small element moving only a small distance.

3

3 reads

An Ideal CLS Score

A good cumulative layout score is anything less than 0.1. The reports from PageInsights or Lighthouse tools will automatically flag any poor scores, as well as provide advice on how to optimize the page for better performance.

3

4 reads

How To Improve Cumulative Layout Shift

1. Use a CMS (content management system).

This will make sure that you’re designing with best practices in mind, and flag any issues before you launch your site.

2. Specify size attributes for images and videos.

Rather than letting them set their own height and width, dictate size attributes for your media.

3. Understand how ads can influence your layout.

Google Publisher Tag offers extensive guidance about how to reserve space for ads.

4. Use transitions and animation to provide context around page changes. 

3

3 reads

Expected Vs Unexpected Layout Shift

CLS only takes into account unexpected changes. If the layout changes because of a user-initiated action, there is no impact on CLS. This is a helpful tool to use when you don’t need to load everything all at once. Instead, offer users the opportunity to choose which elements they want to view through “read more” links or “expand topic” accordions within your page.

3

3 reads

Offer A Better User Experience With CLS Optimization

Paying attention to CLS not only provides a better user experience, but it also boosts your search result rankings. It’s a win-win.

To meet Google’s standards for CLS, start by using a diagnostic tool to measure your website’s current performance. Take into account the basic guidelines outlined above, and keep layout shifts top of mind when designing your website, especially around transitions and content additions. With these few simple considerations, you’ll see better results across the board.

3

2 reads

IDEAS CURATED BY

Vincent Robin's ideas are part of this journey:

The Podcasting Ecosystem

Learn more about marketingandsales with this collection

The importance of networking in podcasting

How to grow your podcast audience

How to monetize your podcast

Related collections

Read & Learn

20x Faster

without
deepstash

with
deepstash

with

deepstash

Personalized microlearning

100+ Learning Journeys

Access to 200,000+ ideas

Access to the mobile app

Unlimited idea saving

Unlimited history

Unlimited listening to ideas

Downloading & offline access

Supercharge your mind with one idea per day

Enter your email and spend 1 minute every day to learn something new.

Email

I agree to receive email updates