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?
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.)
You can use
query strings in order to force the browser's new file update.
Query string example:
Here's an example on a
<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.