visual studio not updating html / javascript to server / browser

Brian picture Brian · Mar 26, 2013 · Viewed 49.5k times · Source

This is an MVC 4 app using the Hot Towel SPA template. Whenever I change anything in the HTML and/or javascript the only way I can get the new code to display is to clear the browser cache. F5, cntrl-F5, shift-F5, nothing works.

I'm not normally a web dev and just learning this. I've done regular MVC before and not had this issue, maybe it has to do with where the HTML and javascript is in my project (i.e. in the /App folder) ?. I'm going nuts trying to figure this out.

I can completely delete an HTML file and run the app and it still runs as it did. Clear cache and run and I then get the update.

It's running using IIS express using Firefox, Chrome, IE...

Thanks..

Answer

Mark Hebert picture Mark Hebert · Jul 1, 2015

In Opera and Chrome (and possibly others), you can disable caching while in 'development mode'.

While in DevTools, the 2nd option in the Settings menu is

Disable cache (while DevTools is open)