I've recently made changes to a clients website but the browser is showing a cached version. It's a static website with .html files. If I delete the cache on my browser it works but what i really want is to force every visitors browser to show the latest version without them having to manually delete their cache.
I understand that you can set a version on .css & .js file to show the latest version but how do you do this with static .html files?
If this is about .css and .js changes, one way is to to "cache busting" is by appending something like "_versionNo" to the file name for each release. For example:
script_1.0.css // This is the URL for release 1.0
script_1.1.css // This is the URL for release 1.1
script_1.2.css // etc.
Or alternatively do it after the file name:
script.css?v=1.0 // This is the URL for release 1.0
script.css?v=1.1 // This is the URL for release 1.1
script.css?v=1.2 // etc.
And you can have a look at here too META TAGS
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With