neve
neve copied to clipboard
evaluate the js impact on the default/common theme setup
Description:
When I install Neve, with all the default settings, we are loading frontend.js, however there is no need for anything like that, if I disable js from browser the site continues to work well.
I think we can have a huge gain if we eliminate js completely for the default settings and load it when really required.
How to reproduce:
- Install Neve & activate
- Disable js and check the site
Expected behaviour:
That we are loading the minimum required for the site to work.
Current behaviour:
We are loading stuff like: https://github.com/Codeinwp/neve/blob/787137f4537079c6284e85cbfad0a93b15abcbf6/assets/js/src/frontend/blog.js, which seems to be only for certain, not common cases.
Reference:
Technical info
- WordPress version: 5.7.2
- Theme version: 2.9
@selul
here is a sample site: https://perpetualdrawer.tastewp.com/, not sure for how long it stays live
one instance that I know where we need js is mobile menu
@selul right. I was checking it on desktop, I guess we can investigate if there is any chance to do it, since might be useful. Not sure if we can load conditionally like :
if (window.matchMedia("(max-width: 480px)").matches) { document.write('