Frau arbeitet am Laptop
News & Trends  | 14 Feb 2024

SEO Lifehacks

Secrets of the Chrome dev tools for optimizing layout shifts (CLS)

Porträt von SEO Experte Raymond Eiber
Raymond Eiber

Step-by-step: Analyzing CLS on the BVDW website

First, we looked at the subpage of the BVDW site that deals with SEO certificate holders. When loading the page, we immediately noticed a jump - a typical CLS problem. To investigate this further, we opened the developer console by right-clicking on a free area and selecting "Investigate".

Throttle the speed for better analysis
Bildschirmfoto einer SEO Konfiguration

Visualisation of layout shifts

To visualise the shifts better, we went to ‘More tools’ and selected ‘Rendering’. Here we activated the ‘Layout shift areas’ option, which highlights all shifts in blue. After reloading the page, all shifts were clearly visible.

Bildschirmfoto Layout
Use of Google Lighthouse to measure the CLS

Once we had completed the visual analysis, we used Google Lighthouse to test the performance of the site. We removed the throttling and had Lighthouse analyse the site. The test showed a CLS of 0.37, indicating that there were significant shifts.

Bildschirmfoto Lighthouse Konfigurationen
Local CSS changes to fix the CLS

To fix the problem, we used the ‘Overwrite’ function in the developer console. We chose a local folder to save the changes and added a fixed height of 310 pixels to the header element ‘pagehead’. This change was saved in the ‘styles.css’ file and remained in place even after the page was reloaded.

Bildschirmfoto Code

Result of the optimization

A new Lighthouse test showed that the CLS was reduced to 0.028 and is therefore in the green zone. This improvement confirms the effectiveness of the changes made.

Another Lighthouse test showed that the CLS was reduced to 0.028 and is therefore in the green zone. This improvement confirms the effectiveness of the changes made.

Porträt von SEO Experte Raymond Eiber

Raymond Eiber

Raymond Eiber is an experienced SEO expert at diva-e. He supports key accounts and optimizes their online presences through customized search engine strategies. In addition to his core SEO role, Raymond supports the sales and marketing team by utilizing his technical and analytical skills to drive business success. In addition to his client support, Raymond develops innovative software solutions during working hours, including the diva-e SEO plugin and OneProSeo.

See all articles