Archived topic
Off Canvas Panel Menu Not loading
6 replies · Started by Gonzalo on March 15, 2023
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!
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
Hi Gonzalo,
Try excluding these:
generatepress/assets/js/menu.min.js
generatepress/assets/css/main.min.css
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.png
But 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.
Try excluding mobile.min.js as 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
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.
Can 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-1853197
Or ask them how to simply exclude GP Premium plugin.