Archived topic
How to remove jQuery and unused CSS from GeneratePress?
1 reply · Started by Ales on January 7, 2021
Hi,
I would like to remove jQuery and unused CSS from my website because it slows down the website.
This is what I have in PageSpeed Insights:

I know that GeneratePress doesn't use jQuery, only for sticky navigation. I had sticky navigation for a while, but now it's off, and the jQuery is still there. How can I please remove that?
And one more question, do you have any idea why I have there an unused CSS file? Is it safe to remove, and if yes, how can I do that?
The website is: animalfate.com
List of plugins:
- Code Snippets
- GAinWP Google Analytics Integration for WordPress
- GP Premium
- Head, Footer and Post Injections
- OMGF
- Rank Math SEO
- Really Simple SSL
- Recent Posts Widget With Thumbnails
- Social Icons Widget & Block by WPZOOM
- Table of Contents Plus
- WP Rocket
- WP Show Posts
- WP Word Count
Thanks a lot!
Best regards,
Alex
Hi there,
the Theme only requests jQuery if you're either the Sticky Navigation or Blog Masonry options. Both of which will be replaced with vanilla JS in a near future update.
If neither option is enabled then other plugins are requesting jQuery - and you would need to replace those plugins.
I think the issue with that pagespeed report is to do with Googles server locations.
If you test your site on GT Metrix - and choose a Canada/US server ( Google server locations ) you will see a much slower time then if you test it on a UK server.
Once google collects some real world data you should see a significant improvement on those metrics.