Archived topic
Poor CLS scores when using Videp or YouTube elements in Gutenberg
24 replies · Started by Mark on June 1, 2022
Alright! We'll be waiting.
The CLS culprit was Optiomize CSS Delivery. I disabled and the CLS dropped right down across the board. Note that the CLS is still very slightly worse than the live site.
The other stats are only marginally better than the live site. I was hoping for better.
Do you have any guidelines for settings that suit GP and GB?
I use:
WP Rocket
Short Pixel Adaptive Images (WebP turned on)
Perfmatters
Thanks
I see. Glad you found the issue.
We don’t have specific recommendations for the optimizations plugins you’ve listed, however, we do have one for Autoptimize.
Here’s the reference: https://docs.generatepress.com/article/configuring-autoptimize/
You can try basing your WP Rocket settings for instance similar to how we recommend Autoptimize set up.
David also give some pointers here: https://generatepress.com/forums/topic/generatepress-and-wp-rocket-what-settings-are-recommended-exclusions/#post-1963198
Hope this helps!
Thanks Fernando.
On the subject of WP Rocket. I did take a look at the other thread you mentioned.
Do I only add the following code into the Delay Javascript Execution exemption section? Or somewhere else? Or is there something else I need to do too?
/generatepress/assets/js/main.min.js
var generatepressMenu
If there’s any form of minification/combination of Javascript you’ve activated in WP Rocket, include that as well in the exclusion if possible.
Hope this clarifies!
Ok, thanks
You’re welcome Mark!
Side note: Minification/combination of Javascript may make your site's performance better, however, more often than not, it also causes various issues.
Thanks Fernando,
I'm keeping an eye on things.
Probably obvious, but just making sure... if the following is added in exclusions:
/generatepress/
generatepress
does this supersede the following?:
/generatepress/assets/js/main.min.js
var generatepressMenu
Also, I added cached pages in the private area for reference, so you can see the issue I was having
Hi there,
according to the WP docs, you have to use a wildcard to exclude all scripts within a subfolder.
See #10 on the list:
https://docs.wp-rocket.me/article/915-find-the-right-js-files-to-exclude-from-minification
Hi David/Fernando,
Therefore, should I replace:
/generatepress/assets/js/main.min.js
with:
/generatepress/assets/js/main.min(.*).js
???