How to force Chrome browser to reload .css file while debugging in Visual Studio? How to force Chrome browser to reload .css file while debugging in Visual Studio? google-chrome google-chrome

How to force Chrome browser to reload .css file while debugging in Visual Studio?


To force chrome to reaload css and js:

Windows option 1: CTRL + SHIFT + R
Windows option 2: SHIFT + F5

OS X: + SHIFT + R

Updated as stated by @PaulSlocum in the comments (and many confirmed)


Original answer:

Chrome changed behavior. Ctrl + R will do it.

On OS X: + R

If you have problems reloading css/js files, open the inspector (CTRL + SHIFT + C) before doing the reload.


There are much more complicated solutions, but a very easy, simple one is just to add a random query string to your CSS include.

Such as src="/css/styles.css?v={random number/string}"

If you're using php or another server-side language, you can do this automatically with time(). So it would be styles.css?v=<?=time();?>

This way, the query string will be new every single time. Like I said, there are much more complicated solutions that are more dynamic, but in testing purposes this method is top (IMO).


[READ THE UPDATE BELOW]

Easiest way I've found is in Chrome DevTools settings.Click on the gear icon (or 3 vertical dots, in more recent versions) in the top-right of DevTools to open the "Settings" dialog. In there, tick the box: "Disable cache (while DevTools is open)"


UPDATE: Now this setting has been moved. It can be found in the "Network" tab, it's a checkbox labeled "Disable Cache".enter image description here