From StackOverFlow: http://stackoverflow.com/questions/1922910/force-browser-to-clear-cache
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:
1 2 3 |
<span class="pln">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.</span> |
Or alternatively do it after the file name:
1 2 3 |
<span class="pln">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.</span> |
You can check out this link to see how it could work.