22.07.2022
Cumulative Layout Shift (CLS) is one of the core web vitals metrics. CLS is a metric that measures the shifting of the position of elements, that is their visual stability, as a website continues to download. Elements that may cause order shift; videos, images, forms, buttons, and different types of content.
Cumulative Layout Shift can be for many reasons:
Apart from these, the fact that the site speed is too low and the width and height values are not entered on the HTML adversely affects the visual stability, which leads to an increase in CLS.
One of the tools we can use to measure the CLS metric is Google PageSpeed Insights. Apart from that, another tool we can use is the Google Chrome Lighthouse extension. Can we understand the existence of CLS without using tools? Yes, we can notice the shifts in large elements when we first start loading our site , to be able to notice more clearly, it is enough to start loading the site at low internet speed.
To eliminate the CLS issue, we first need to maintain visual stability on our site. If we talk about visuals as an example, if you do not specify the width and height values on the HTML, the element before the image will be loaded until the page loads. Once the image is loaded, the image will take its place, and the element that comes in its place will slide down. So, if we determine the width height values of the images on HTML, will it not cause problems in terms of responsiveness? everyone started thinking. A correct idea, if we determine only through HTML, visuals on mobile will create problems. Therefore, we need to use the following css for img tags;
img
{
width: 100%;
height: auto;
}
You can watch the video below for detailed information.
You can use the font-display feature of CSS and codes such as auto, optional, swap to lower the CLS value and repair these problems.
font-display: auto;
0.0 – 0.1 | 0.1 – 0.25 | 0.25++ |
Successful | Open to Development & Acceptabl | Failed |
SEO has been many years since we came out of a position where ranking was achieved only with the right content planning and keyword optimization. Now, Google Keyword puts the pages with good targeting and user experience in the first place. The CLS metric entered our lives with the core update such as core web vitals to measure the user experience. If your site loads fast and has high visual stability, the user who enters our site has more session time and this is reflected in our Bounce Rate rates.
Perfist Blog
Similar Articles
In this guide, we will explain what a session is in Google Analytics 4 (GA4), why session duration matters, which session metrics are available, and how to configure these settings. What is a Session in GA4? A session represents the group of interactions a user has with your website or mobile app within a given […]
Read More
Beginner Level Web/App AnalyticsWhat is GEO (Generative Engine Optimization)? GEO is a new generation optimization method that ensures content stands out in AI-supported search systems. It aims to produce content that can provide quick and clear answers to user questions. In addition to traditional SEO, a simple and understandable language that appeals to artificial intelligence is used. Why […]
Read More
Mid Level SEOGEO is an optimization method developed to ensure that content is better understood and recommended by AI-powered search engines. Previously, when writing content, the goal was solely to rank high on Google. Now, however, AI systems read these contents and present summaries to users. This is exactly where GEO steps in. It ensures that content […]
Read More
Mid Level Content MarketingUnderstanding how visitors reach your website is crucial for measuring the success of your marketing strategies. Google Analytics 4 (GA4) provides the Channel Grouping feature to analyze traffic sources. With channel grouping, you can categorize visitor traffic into specific segments and make more informed marketing decisions. What is Channel Grouping in GA4? GA4’s channel […]
Read More
Beginner Level Web/App Analytics