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
What is Site Speed? Site speed refers to how quickly a web page loads. (Site speed has multiple factors. The most important of these are initial load time and load speed.) This speed directly affects the visitor experience. A slow-loading site can cause users to leave the site and choose other pages. Additionally, search engines […]
Read More
Mid Level SEOWhat is Structured Data? Structured data is a coding system used to help search engines better understand the content of a website. Implemented using formats like JSON-LD and Microdata, it enables the presentation of detailed information such as products, events, and business details in a comprehensible way. This is especially advantageous for e-commerce websites, as […]
Read More
Mid Level SEOIn the digital marketing world, user-generated content (UGC) is becoming increasingly important. UGC includes videos where users share their own experiences, opinions, and creativity in promoting brands and products. So, why are UGC videos so significant in digital marketing strategies? 1. Trustworthiness and Authenticity User-generated content creates a more trustworthy perception for consumers compared to […]
Read More
Performance MarketingWith the transition from Universal Analytics to Google Analytics 4, there may be some issues you need to resolve. One of these issues is “unassigned” traffic. Dimensions appearing as “unassigned” / (not set) in reports negatively impact your ability to analyze and optimize. We will discuss the causes of “unassigned” traffic in your GA4 reports […]
Read More
Beginner Level Web/App Analytics