- This topic has 6 replies, 3 voices, and was last updated 3 years ago by
Leo.
-
AuthorPosts
-
March 15, 2023 at 8:20 pm #2569339
Gonzalo
Hi,
I been troubleshooting a CLS issue on my page all day without success.
I was able to improve the CLS score a lot by delaying JS loading until interaction as seen on following image (I am using litespeed cache):
https://svpremier.com/wp-content/uploads/2023/03/Screen-Shot-2023-03-15-at-8.10.50-PM.png
However, now that I enabled that setting the off canvas menu is not loading when you click on it…
Any ideas on how to fix it? Maybe preventing the JS for the menu feature from being delayed? I know there is a setting within Litespeed to prevent certain JS files from loading delayed. But not sure what I should put in there.
Any help is much appreciated!
March 15, 2023 at 8:24 pm #2569341Gonzalo
here is the image for the setting where you can include js to prevent it from loading.. but not sure what I should put there:
https://svpremier.com/wp-content/uploads/2023/03/Screen-Shot-2023-03-15-at-8.23.03-PM.png
Oh, and my website is https://svpremier.com
March 15, 2023 at 8:38 pm #2569344Fernando Customer Support
Hi Gonzalo,
Try excluding these:
generatepress/assets/js/menu.min.js generatepress/assets/css/main.min.cssMarch 15, 2023 at 9:12 pm #2569357Gonzalo
Unfortunately that does not work, I added it as follows:
https://svpremier.com/wp-content/uploads/2023/03/Screen-Shot-2023-03-15-at-9.17.56-PM.png
https://svpremier.com/wp-content/uploads/2023/03/Screen-Shot-2023-03-15-at-9.17.48-PM.pngBut menu still not loading. Any other ideas?
I am using the off canvas menu panel, not sure if that uses the same js code as regular menu.
March 15, 2023 at 10:43 pm #2569403Fernando Customer Support
Try excluding
mobile.min.jsas well.If you’re able to exclude classes, try excluding the ones mentioned by this customer here: https://generatepress.com/forums/topic/remove-unused-css-and-menu-off-canvas/#post-1853197
March 16, 2023 at 8:49 am #2570138Gonzalo
Unfortunately none of that worked.
It is a shame because page speed score goes up a lot by delaying JS loading and the whole website works ok with that setting on to the exception of that menu that does not even open.March 16, 2023 at 10:26 am #2570219Leo
StaffCustomer SupportCan you check with LiteSpeed’s support to see if you can exclude certain classes?
That’s what the author is doing here and it seemed to work for him:
https://generatepress.com/forums/topic/remove-unused-css-and-menu-off-canvas/#post-1853197Or ask them how to simply exclude GP Premium plugin.
-
AuthorPosts
- You must be logged in to reply to this topic.