By Augusto Goncalves (@augustomaia)
Cache is a common source of problems during web development. It's not unusual to solve some mysterious problems by cleaning the browser history (or just the pages stored locally). So why not do our localhost debug in incognito/private mode?
To make it the default option on Visual Studio is quite simple: on the "Run" toolbar button, click on the dropdown arrow, then select "Browse With..."
Next, on select your browser. For Chrome add the --incognito argument, or -private-window for Firefox or -private for Edge. Add a "Friendly name" such as "Chrome Incognito" and click "Set as Default" to make it even easier.
That's it. Now when you close the browser and restart everything is cleaned and you should avoid cache problems during development.
Once your app is published, if you use a HTTPS, it also avoids cache as there is no local copy of files.