Hi,
I have a MVC app developed in VS2008.
When I run the app the changes I made to a JS file are not being updated.
Is this the browser problem (IE7) or VS2008 dev server problem??
If I use Firefox it is updated?
Malcolm
Hi,
I have a MVC app developed in VS2008.
When I run the app the changes I made to a JS file are not being updated.
Is this the browser problem (IE7) or VS2008 dev server problem??
If I use Firefox it is updated?
Malcolm
I have the same problem. When I make changes to a JS file, my only solution is to to a full refresh (CTRL-F5) to see the JS changes. My guess is that the VS development server is not smart enough to handle static file caching.
I do not have this problem with a real IIS7 server on any browser.
Probably the browser. Here's the trick I use, (and StackOverflow uses). In your HTML files, put a version number in the query string for your JS files like so:
<link href="foo.js?version=somethingthatchanges" />
This will cause the browser to go back to the server each time you update your app to get a new JS file. You can either hard-code an increasing number here in the query string, or you can put in your .NET assembly version info there if you want.