Site logo

[Support request] CLS issue: more than 0.25 (mobile)

Home Forums Support [Support request] CLS issue: more than 0.25 (mobile)

Home Forums Support CLS issue: more than 0.25 (mobile)

  • This topic has 5 replies, 3 voices, and was last updated 5 years ago by David.
Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #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
    daisy

    #1741140
    Elvin
    Staff
    Customer Support

    Hi 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.

    #1741411
    bruce

    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’ );

    #1741502
    David
    Staff
    Customer Support

    Hi 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

    #1741533
    bruce

    Thanks so much.

    #1741570
    David
    Staff
    Customer Support

    Glad to be of help.

Viewing 6 posts - 1 through 6 (of 6 total)
  • You must be logged in to reply to this topic.