- This topic has 26 replies, 5 voices, and was last updated 9 months, 4 weeks ago by Elvin.
January 17, 2021 at 5:52 pm #1622861Shane
My GT Metrix test this morning shows a high CLS of 0.28 when a score of 0.1 is recommended I have been told by my host that my theme provider will be able to provide me with some solutions. Any assistance is appreciated thank you.
Performance ReportJanuary 17, 2021 at 7:34 pm #1622913LeoStaffCustomer SupportJanuary 17, 2021 at 8:54 pm #1622949Shane
Hi Leo Yes I have provided that detail in the private info area, thanksJanuary 17, 2021 at 9:09 pm #1622956ElvinStaffCustomer Support
Let’s tackle each one by one.
“Ensure text remains visible during webfont load”
The theme’s font icons are being flagged. To address this, you can switch GP icons from fonts to SVG icons through Customizer > General.
“Avoid large layout shifts”
The elements flagged here are usually the contents of your pages. The reason can be from an unoptimized image, font, or CSS.
In your case, It may be from the image or CSS. As for the Image, try optimizing it with Optimole or Smush. As for the CSS, you can use Autopmitize.
“Eliminate render-blocking resources”
Tom recommends Autoptimize to address this:
Here’s a brief documentation on configuring Autoptimize.
As to why we recommend Autoptimize, check David’s reply here.
Note: You may have to exclude a few styles or scripts on Autoptimize incase some plugins don’t work.
A wise man once said:
"Have you cleared your cache?"January 17, 2021 at 10:51 pm #1623018Shane
Thank you Elvin, I have changed GP icons to SVG icons, plus I have now activated Autoptimize and completed those tasks as per https://docs.generatepress.com/article/configuring-autoptimize/
I also clear the cache daily on my site.
What do you suggest is the next step, please?January 17, 2021 at 11:32 pm #1623052ElvinStaffCustomer Support
Try disabling lazyload.
To turn off WordPress default’s lazyloading, try adding this PHP snippet:
add_filter( 'wp_lazy_loading_enabled', '__return_false' );
Here’s how to add PHP code/s – https://docs.generatepress.com/article/adding-php/
If you’re using WP Rocket, try following this article.
A wise man once said:
"Have you cleared your cache?"January 18, 2021 at 1:32 am #1623140Shane
Thank you Elvin, Can I ask what turning off WordPress default’s lazyloading actually achieves?
Thank you.January 18, 2021 at 8:36 am #1623824DavidStaffCustomer SupportJanuary 19, 2021 at 8:39 pm #1625765Shane
Thank you, I have now turned off WordPress default’s lazyloading, by adding this PHP snippet:
( ‘wp_lazy_loading_enabled’, ‘__return_false’ );
I have now completed all the above tasks except excluding specific images from Smush (Last Message)
and the CLS score of 0.28 has not changed.
I will now try to disable the Logo being lazyloaded from the Smush CDN and see how that goes.
Thank youJanuary 20, 2021 at 1:24 pm #1626912Shane
Hi Support, I have now disabled the Logo being lazyloaded from the Smush CDN.January 21, 2021 at 1:06 am #1627315DavidStaffCustomer Support
Well thats a lot better – the CLS is well below where it was and is in the Green values.
The minor CLS that is left, still looks related to the lazyloading.
Open the site in Chrome, open the Dev Tools, and go to Network tab and switch from Online to Slow 3G – with dev tools still open, refresh the page or navigate some links…. you will see that some of the image placeholder sizes are incorrect, causing CLS when the image loads.January 21, 2021 at 2:19 am #1627374Shane
Hi David, Yes much better I am very happy with those results so far. I will take care of that task you have given me tomorrow. Thank you.January 21, 2021 at 3:24 am #1627465DavidStaffCustomer SupportJanuary 26, 2021 at 10:45 pm #1635109Shane
Hi David, so I done that task, switched from online to slow 3G and refreshed the page, however, when I go back into the dev tools it still shows as online is this correct? thanksJanuary 27, 2021 at 5:10 am #1635408
- You must be logged in to reply to this topic.