25
5
So, if I go to Internet options in Internet Explorer:

I can adjust the settings for when IE checks for updates:

Can I do something similar in Google Chrome? Right now when I change my JavaScript file and debug from Visual Studio, Chrome will always use the cached version rather than using the modified version. In order to be able to use the current version I have to manually clear out my temporary internet files/cache, which is really annoying.

14Why don't you disable the caching done by Visual Studio instead? (Seriously, who in the heck designs an IDE with caching?) – jpmc26 – 2017-04-05T01:10:27.857
2@jpmc26 What caching? – EJoshuaS - Reinstate Monica – 2017-04-05T01:20:54.203
21I worded my last comment loosely; my apologies if that made it unclear. Browsers only cache files if the server sends back specific headers. It's stupid for Visual Studio's development server to send back cache headers by default, since changes to those files should be expected. An extra part-second loading the page is well worth not dealing with problems from outdated JS and CSS files being cached in the browser. I sincerely hope there is some way to disable it. – jpmc26 – 2017-04-05T02:13:59.323
1
Couldn't find any Visual Studio options but a development web.config change may solve the caching in visual studio. https://www.iis.net/configreference/system.webserver/staticcontent/clientcache
– GER – 2017-04-05T14:51:56.7631Chrome extension "Cache Killer" solved it for me, I don't know why but ctrl+f5 sometimes doesn't work for me – flagg19 – 2017-04-05T15:12:42.817
1If you're developing, it might be useful to add ?v=<latest_assembly_version> to the URL for each JS file. This has the advantage of breaking badly behaving cache servers in the wild when your app is deployed. – Andy – 2017-04-05T22:40:55.717
1
@jpmc26 My experience is that browsers (and/or proxies and other bits that "get in the way") certainly can and do cache things, even in the presence of headers to the contrary (see this question and answers for what appears to be a good study of how to [attempt to] control this for different browsers).
– TripeHound – 2017-04-06T06:58:05.6571
Check this out when you have some free time: http://stackoverflow.com/questions/11245767/is-chrome-ignoring-control-cache-max-age
– Renan – 2017-04-06T12:19:19.600@TripeHound If the server doesn't specify any caching headers, they will reload the content every time. Not caching is literally the default. – jpmc26 – 2017-04-06T20:46:31.710