Can I force the client to stop caching old stylesheets and javascript?
In my dynamic web-site, I need to force the client to stop caching old
versions of my stylesheets and javascript. Can I do this by including
a querystring with the url with each external stylesheet and script
file declaration?
For example:
<link type="text/css" rel="stylesheet " href="../images/menu.css?
v=1" />
<script type="text/javascript" src="../javascript/menu.js?v=1"></
script>
This is far easier, for me, than coding the web-server to change the
file headers. I just want confirmation that this will work. It seems
obvious that it should but I'm curious as to why I've never come
across this technique before.