I have an ASP.NET mvc application hosted on a server. I am continually updating my CSS and JS files for the application. After changing the files and updating the same on server, when I hit the URL for my application it runs with client cache. Is there any easy mechanism by which I can clear the cache whenever there is any change in static files.
+2
A:
Simplest trick would be to attach a version query string parameter to your static file requests. This will make the browse cache a new version every time. For an example, view source on this page--they even do it here.
Wyatt Barnett
2009-11-30 16:58:57