I use Visual Studio 2017 for web development pretty heavily, and when you let it open a browser (Chrome is my preference, though this would apply to Edge) it often loads cached versions of scripts and CSS. I know I can go to the Network
tab and choose Disable Cache
, but is there a way to get VS to just always load the browser with that option selected?

- 2,165
- 7
- 45
- 82
-
1**for chrome :** resolved in [https://stackoverflow.com/questions/40628864/disable-browser-caching-for-css-and-js-file-during-development/52275910#52275910](https://stackoverflow.com/questions/40628864/disable-browser-caching-for-css-and-js-file-during-development/52275910#52275910) – Kubaizi Sep 11 '18 at 12:29
-
1I was already using the hard refresh option - this was more of a Visual Studio question, because every time Chrome launches in debug, it starts a new session (which isn't tied to my normal Chrome instance, doesn't have me logged in, etc.) and the cache was always re-enabled. I was hoping there was a way to tell VS to stop doing that :-) – Scott Salyer Sep 12 '18 at 13:19
2 Answers
You can point cache dir to null using startup arguments for chrome.
This will disable any caching.
First manage browsers
Then add new Chrome browser with attribute: --disk-cache-dir=null

- 429
- 3
- 12
-
2
-
1
-
1It wasn't working for me at first, but after I close all my visual studio and chrome, it worked! Thanks... :) – Sam Oct 31 '21 at 10:14
-
1WOW! I wish I could do that, but I am running Visual Studio 2022 and cannot see how to add it - I just select Google Chrome - but can see no way to edit it. The Add button is not in this version. I found out how to add it. I clicked on "Browse With". – John Foll Jan 31 '23 at 19:03
• Go to Tools -> Options -> Debugging -> General : CHECK "Enable Just My Code".
• Go to Tools -> Options -> Debugging -> Symbols
• Click on the "..." button and create/select a new folder somewhere on your local computer to store cached symbols. Then Click on "Load all symbols" and wait for the symbols to be downloaded from Microsoft's servers, which may take a while. Note that Load all symbols button is only available while debugging.
• UNCHECK the checkmark next to "Microsoft Symbol Servers" to prevent Visual Studio from remotely querying the Microsoft servers. -> Click "OK".

- 422
- 1
- 6
- 21
-
3I'm not sure this solves my question? It's not a matter of speed - it's telling Chrome/Edge to disable their local JS/CSS caching whenever VS opens the browser instead of me having to remember to do this every time. – Scott Salyer Mar 29 '18 at 17:38