Wordpress LScache Plugin: Exclude JS file
Last Updated on: Wed, 15 Apr 2026 00:00:02 Hi Guys, Quick question? How does one exclude a particular js file from being cached? In our case a privacy plugin requires a js file not to be cached but I cant seem to find where to do that. Cheers, Gerard Hi, You can find JS Excludes TextArea under the Tuning Tab, if you dont see the Tuning tab please click on green button Show Advanced Options at top right in the plugin settings page. You can put the name or a just a part of the javascripturl you want to exclude, I had an issue minifying/combining a javascript file, excluding it resolved my problem. Cheers. @lhoucine thanks for that. Thats what I did but the text for the field seems to imply this is only to prevent it from being minified (I am not minifying js) Hi, There are 3 suggestions you can try : 1 ? consider to add a query string when queuing your script, example /?/my-script.js?ver=213133254 , you can use a time function to generate the version number, so you can prevent browsers from caching your script. 2 ? also you can try to exclude it from combining 3 ? then try to check if Remove query strings from static resources is disabled I hope this helps you Hi, You can check http header on that JS file , it should not be cached , unless you see x-litespeed-cache: hit header. Best regards,
LiteCache Rush: Speed comes from using less, not from doing it faster
Reference