Archived topic
CLS Issue
20 replies · Started by Kelly on September 25, 2020
@david Could you please looking into my page as well and let me know what can i change.I have a lot of CLS issue: more than 0.25 (mobile) issues, which were not there but recently started to showup.
Much appreciated. Sorry i had to use a URL shortner: https://bit.ly/39Ox3CB
Hi there,
couple of common issues:
1. You will want to disable lazy loading on the Logo - to do that add this PHP snippet:
function rocket_lazyload_exclude_class( $attributes ) {
$attributes[] = 'class="is-logo-image"';
return $attributes;
}
add_filter( 'rocket_lazyload_excluded_attributes', 'rocket_lazyload_exclude_class' );
2. WP Rocket Critical CSS - unless you're able to write your own critical CSS you should DISABLE this option. As this is a major cause of CLS.
@david thank you for your response. Tried that. disabled critical CSS and Added it to the snippet. No change, now getting a slightly lower score
https://snipboard.io/iqS9FO.jpg - Under the layout shift section in page insights
Can you start a new topic so as the Original Topic Poster doesn't get a lot of email pings. Share a link to a Post/Page that you're running a test on and ill go through it
Theres a chance that the your Page has been cached on your Server or CDN. Try clearing any page caching.