Maple Ranking - Online Knowledge Base - 2025-09-04

Best practices and strategies to reduce Cumulative Layout Shift

To reduce Cumulative Layout Shift (CLS) effectively, the best practices and strategies focus on ensuring visual stability by reserving space for elements before they load and managing dynamic content carefully:

  • Specify explicit width and height for images and videos in the HTML markup. This reserves the correct space on the page before media loads, preventing content from shifting unexpectedly.

  • Reserve space for ads and dynamically injected content by using CSS properties like min-height or aspect-ratio. This avoids layout shifts caused by late-loading ads pushing content around. For ads with variable sizes, reserve space for the largest expected size or use historical data to set a stable container size.

  • Handle web fonts and font loading properly, for example by using the preload attribute, to prevent layout shifts caused by font swaps or late font loading.

  • Avoid removing reserved space for elements such as ads or placeholders if no content is returned, as collapsing space can cause layout shifts similar to inserting new content.

  • Use tools to identify shifting elements, such as Chrome DevTools with Layout Shift Regions enabled, PageSpeed Insights, or CLS debugging tools, to pinpoint and fix specific causes of layout shifts.

  • For WordPress sites specifically, use performance-optimized themes and plugins that automatically add image dimensions and manage embeds properly, such as WP Rocket or Perfmatters.

  • Place late-loading content lower in the viewport when possible, as shifts near the top of the page are more noticeable and impactful on CLS scores.

These strategies collectively improve user experience by maintaining layout stability during page load and dynamic content injection.

Internet images

Maple Ranking offers the highest quality website traffic services in Canada. We provide a variety of traffic services for our clients, including website traffic, desktop traffic, mobile traffic, Google traffic, search traffic, eCommerce traffic, YouTube traffic, and TikTok traffic. Our website boasts a 100% customer satisfaction rate, so you can confidently purchase large amounts of SEO traffic online. For just 720 PHP per month, you can immediately increase website traffic, improve SEO performance, and boost sales!

Having trouble choosing a traffic package? Contact us, and our staff will assist you.

Free consultation

Free consultation Customer support

Need help choosing a plan? Please fill out the form on the right and we will get back to you!

Fill the
form