Wordpress LScache Plugin: JS optimization
Last Updated on: Wed, 15 Apr 2026 00:00:02 Hello there, Im trying to defer some JS on our web site. Id like to ask you how I can choose which JS defer if after the minify all JS files made by Litespeeed are like 231312.js . These numbers always changes: https://www.dropbox.com/s/okn2dkmjl7nxogb/Screenshot%202020-03-17%2011.21.15.jpg For example Id like to defer some JS related to Facebook. Considering that do not exist a way to defer only some files, I need to defer all JS and then exclude some. But how I can exclude all JS minified by Litespeed? Thanks. You can try using the path litespeed/cssjs/ In our case JS and CSS files are not there. But inside /xxxx.com/min/. I tried to use it to exclude the CSS and JS files minified by Litespeed, but it did not work. The Facebook JS are uploading in the same position. And in the meanwhile I see some issues with the layout. Maybe you should try to think a way to optimize the manage of common external JS like Facebook and Google one. Who do not use them with WordPress? Hi, When you have JS optimization off , you should see a real path to the JS file , please try exclude that path , instead of the ones in /min/ Best regards, In v3, the path is what I replied. In v2, its /min/ Thanks to both. I tried to do as @CacheCrawler suggested, but something goes wrong with the loading of some JS. Theoretically there shouldnt be any difference between a JS loaded without JS Deferred on and inserting it in JS Deferred excluded. Instead some JS does not work if I try to set on the JS Deferred feature and try to exclude them. So I simply cant use that function. But its not only that. I was trying to defer some JS that are not really important to print the page. And they remains there also with JS Deferred on and also without including them in DS Deferred excluded. Hi, Im bit of confused now , could you please clarify what exactly is it you want to do ? Best regrds, Id like to defer the loading of some JS. If I understood well there isnt a way to do it directly. But I need to defer all JS and only then exclude some JS that I want to keep above. I did it, but without any result. For example, WordPress loads some JS that are not really important to print the page. So Id like to defer them. But following the instruction mentioned above it doesnt work. The JS remain immediately after the CSS files. The same thing happen with external JS and internal. Do you have any suggestion to try to fix it? Hi, What if , you reset LSCWP to default , and only enable defer JS how does these JS being loaded ? please check with HTML code , see if there is defer flag. Best regards, Right now we found a good compromise combining some JS and excluding some. Well avoid to defer JS now, because were already glad about the result. Thanks the same!
LiteCache Rush: Speed comes from using less, not from doing it faster
Reference