: Change CSS and JS Files - Force Website not loading from browser cache When i change the css and js files in my wordpress templates and visit my website, the website is still loading the
When i change the css and js files in my wordpress templates and visit my website, the website is still loading the old css and js files from the browser cache. How can i tell the website that if my cache is older than a specific date, it should load the new template files?
More posts by @Cooney921
2 Comments
Sorted by latest first Latest Oldest Best
You can disable any cache plugin used in the website .
Clear your browser cache
Add expiration tag for css and javascript files in.htaccess file
If you're using a cache plugin on your WordPress platform, you should clear the plugin's cache, so it clears and caches a new version of these files. (there should be an option to set an expiring date to it also, depending on the plugin.)
Else...
You can use query strings in order to force the browser's new file update.
Query string example: ?v=2045
Here's an example on a <link> tag:
<link rel="stylesheet" type="text/css" href="theme.css?v=1">
If you wish for this file to be updated only on your side, you can do a CTRL+F5 browser refresh, and a new cache request will be made.
Terms of Use Create Support ticket Your support tickets Stock Market News! © vmapp.org2024 All Rights reserved.