- This topic has 5 replies, 3 voices, and was last updated 5 years ago by
David.
-
AuthorPosts
-
April 19, 2021 at 4:00 pm #1740913
bruce
Hi
We use the default template, and we get the best speed, but still have the problem on CLS.
Please check our URL https://www.ponfish.com/100-best-innocent-smile-of-a-baby-quotes/ , and how to fix them because there are 170 affected URLs.
best regards
daisyApril 19, 2021 at 10:59 pm #1741140Elvin
StaffCustomer SupportHi there,
The most obvious issues for the CLS would be the lazyloaded images above the fold like the logo and the featured image on post page. Consider disabling lazyload for these images.
Other thing/s would be:
You have a plugin named shortcodes ultimate which requests a font named forkawesome. preloading or setting it to font-display swap.As for how to do it, you should ask the plugin developer/support on their preferred method for this.
April 20, 2021 at 4:06 am #1741411bruce
Thanks for your reply.
And we add some PHP sniff to disable featured images and logo image.
Even if our page speed is above 90 for this https://www.ponfish.com/top-best-pop-up-tents-for-craft-shows/.
But the CLS 0.27 can not be changed at all.
Do you have any solution for it?
Thanks so much.
daisy
code:
add_filter( ‘wp_get_attachment_image_attributes’, function( $attrs ) {
if ( is_single() ) {
$attrs[‘skip-lazy’] = ‘skip-lazy-yes’;
}return $attrs;
} );add_filter( ‘generate_logo_attributes’, function( $attr ) {
$attrs[‘skip-lazy’] = ‘skip-lazy-yes’;return $attr;
} );function rocket_lazyload_exclude_class( $attributes ) {
$attributes[] = ‘skip-lazy=”skip-lazy-yes”‘;return $attributes;
}
add_filter( ‘rocket_lazyload_excluded_attributes’, ‘rocket_lazyload_exclude_class’ );April 20, 2021 at 5:50 am #1741502David
StaffCustomer SupportHi there,
when i test your page on Page Speed insights the Lab Data CLS is
0– which means there is no CLS on initial page load. The Origin Summary data will take time to update to its value to reflect this change.If the origin data doesn’t improve over time then it means something is happening on the page after its loaded to cause the issue.
The only element i cans see that causes Layout Shift is the Table of Contents toggle open / close. I checked that in the Chrome Dev tools Performance tab – and yes it does register Layout Shift ( when open / closed ) – but it also registers the hadRecentInput Flag: Yes. So this should not be collected by Google.
I think its just a matter of waiting for the Origin Summary to udpate
April 20, 2021 at 6:04 am #1741533bruce
Thanks so much.
April 20, 2021 at 6:30 am #1741570David
StaffCustomer SupportGlad to be of help.
-
AuthorPosts
- You must be logged in to reply to this topic.