Site logo

Archived topic

LCP over 4.4s (!) unless I delay JS, but that breaks my Off Canvas Mobile Menu

4 replies · Started by Forum User on February 5, 2023

Viewing posts 1–5 of 5

I am hosted using Cloudways
I use their Breeze plugin to minify and combine js.

No problem - except when I come to delay Js. This breaks the offscreen canvas (doesn't appear at all.)

Switching from Delay JS to Delay JS Inline Scripts jumps my LCP on mobile form 1.5s to 4.4s.

I moved to GeneratePress from Divi to try and fix all my slow speed warnings in GSC.

I found an old support ticket that listed 4 .js to exclude, one of the was inline.js I think - this didn't bring the menu back.

Can someone give me an exhaustive list of .js to exclude so I can try an keep a good LCP?

Thank you

Just curious. Have you went into Customizer > General and set it to use external file instead of inline, and then regenerate?

I don’t know if that will help for you but it’s easy to try and reverse if it doesn’t.

Hi there,

list of all scripts that GP may load. Note they only load if a) the option is enabled in the theme and b) the template being viewed requires them ( eg. blog masonry only loads on blog and archives ):

Default Mobile menu
/wp-content/themes/generatepress/assets/js/menu.min.js

Off Canvas
/wp-content/plugins/gp-premium-master/menu-plus/functions/js/offside.min.js

Navigation Search
/wp-content/themes/generatepress/assets/js/navigation-search.min.js

Sticky Nav:
/wp-content/plugins/gp-premium-master/menu-plus/functions/js/sticky.min.js?ver=2.2.1

Blog -> Infinite scroll
/wp-content/plugins/gp-premium-master/blog/functions/js/infinite-scroll.pkgd.min.js

Blog Masonry
/wp-content/plugins/gp-premium-master/blog/functions/js/scripts.min.js
Which has a core dependency: /wp-includes/js/masonry.min.js

Hi Scott,

That options was already set to External, but thanks for letting me know, I didn't even know that was an option and I've been using WP for years!

Was worth a shot 😊

This archived topic is closed to new replies.