I'm currently editing a .css file inside of Visual Studio 2012 (in debug mode). I'm using Chrome as my browser. When I make changes to my application's .css file inside of Visual Studio and save, refreshing the page will not load with the updated change in my .css file. I think the .css file is still cached.
I have tried:
- CTRL / F5
- In Visual Studio 2012, Go to project properties, Web tab Choose Start External Program in the Start Action section Paste or browse to the path for Google Chrome (Mine is C:\Users\xxx\AppData\Local\Google\Chrome\Application\chrome.exe) In the Command line arguments box put -incognito
- Used the Chrome developer tools, click on the "gear" icon, checked "Disable Cache."
Nothing seems to work unless I manually stop debugging, (close out of Chrome), restart the application (in debug).
Is there any way to force Chrome to always reload all css changes and reload the .css file?
Update:
1. In-line style changes in my .aspx file are picked up when I refresh. But changes in a .css file does not.
2. It is an ASP.NET MVC4 app so I click on a hyperlink, which does a GET. Doing that, I don't see a new request for the stylesheet. But clicking F5, the .css file is reloaded and the Status code (on the network tab) is 200.
With macOS I can force Chrome to reload the CSS file in by doing
⌘ + SHIFT + R
Found this answer buried in the comments here but it deserved more exposure.
For macOS Chrome:
Network
Disable cache (while DevTools is open)
see screenshot:You are dealing with the problem of browser cache.
Disable the cache in the page itself. That will not save supporting file of page in browser/cache.
This code you require/need to insert in
head
tag of the page you are debugging, or inhead
tag ofmaster page
of your siteThis will not allow browser to cache file, eventually files will not be stored in browser temporary files, so no cache, so no reloading will be required :)
I am sure this will do :)
Chrome/firefox/safari/IE
will reload the entire page by these shortcutsCtrl + R (OR) Ctrl + F5
Hope it may helps you!.