-
hey!
Doing some spring cleaning for page speed and I wonder what is the purpose of all these JS files and what is their function.
For example I know jquery is only used for sticky navigation.. I.e. if I dont use sticky navigation i might think about removing jquery.
/wp-includes/js/jquery/jquery.min.js?ver=3.6.3
/wp-content/themes/generatepress/assets/js/menu.min.js?ver=3.1.3
/wp-content/plugins/gp-premium/menu-plus/functions/js/sticky.min.js?ver=2.3.1
/wp-content/plugins/gp-premium/menu-plus/functions/js/offside.min.js?ver=2.3.1
/wp-content/plugins/gp-premium/general/js/smooth-scroll.min.js?ver=2.3.1 -
Hi there,
For example I know jquery is only used for sticky navigation.. I.e. if I dont use sticky navigation i might think about removing jquery.
Yes, you can do so if there’re no other plugins or script is using jquery 🙂
But if you do not use sticky navigation, jquery should not be loading.
-
Thank you!
How about the other files, what do they do?
-
Fernando
The other files you mentioned are for the Sticky Header, the Off canvas menu, and smooth scrolling, respectively.
-
sorry to ask im not so familiar what each achieve in generate press.
If jquery is for sticky header, is sticky header for that only too? So if I dont have sticky header, i could theoretically remove both jquery & sicky header?
And what is off canvas menu in this context?
Is smooth scrolling only used for up down anchors, go to top of the page?
-
Fernando
Here is the article for more details with regards to the Off Canvas panel if this is what you’re looking for: https://docs.generatepress.com/article/off-canvas-panel-overview/
This is the one for smooth scrolling: https://docs.generatepress.com/article/smooth-scroll/
As for jquery, if you don’t use the sticky header, you can remove both.
-
so /wp-content/plugins/gp-premium/menu-plus/functions/js/sticky.min.js?ver=2.3.1 is only used for sticky nav? so same as jquery
this i believe is for the menu to function normally
/wp-content/themes/generatepress/assets/js/menu.min.js?ver=3.1.3im using premium
-
Fernando
Yes, you’re right about both.
-
Great thank you!
-
Fernando
You’re welcome, Liish!
- You must be logged in to reply to this topic.