Hello,
I think it’s not the proper way to do it. Why to call and load all js files everywhere in your website.
I think it’s better to use a plugin which minifies html, css and js files.
I use this plugin https://ww.wp.xz.cn/plugins/autoptimize/ It does what exactly it is made for!
Best regards
Hey ,
i did that and when i go here> https://varvy.com/tools/js/ it doesnt seem to have mix all the javascript in one fill ,
and my loading time of my page doesnt change,
have you some clue ?
thanks !
Can you provide your website url?
In general, few javascript files, like jquery.js, are not optimized:
Starting from AO 2.1 WordPress core’s jquery.js is not optimized for the simple reason a lot of popular plugins inject inline JS that is not aggregated either (due to possible cache size issues with unique code in inline JS) which relies on jquery being available, so excluding jquery.js ensures that most sites will work out of the box. If you want optimize jquery as well, you can remove it from the JS optimization exclusion-list (you might have to enable “also aggregate inline JS” as well or switch to “force JS in head”).
Also, in order to achieve the best results from this plugin, you must configure right for your needs.
https://ww.wp.xz.cn/plugins/autoptimize/faq/