Google chrome css doesn't update unless clear cache
- Open
DevTools
- Open
Settings
(bottom right or useF1
shortcut) - Check
Disable cache (while DevTools is open)
https://developers.google.com/chrome-developer-tools/docs/settings#general
Why isn't my css applied unless i clean browser cache?
You could edit your server settings but I’d just get in a habit of doing a “Hard Refresh” instead of a refresh.
When developing websites I always use Hard Refresh over regular refresh to avoid something old getting pulled from the cache. Simply press Ctrl + shift + r for a hard refresh or see the link above for a list of shortcuts on different systems and browsers.
Cleared cache and Chrome won't stop using old CSS
Try CTRL + SHIFT + R instead (shortcut key for Hard Reload in Chrome).
You can also try add ?ver=anynumber at the end of your linked css to force browsers to reload it:
<link rel="stylesheet" href="assets/css/styles.css?ver=100">
How to force Chrome browser to reload .css file while debugging in Visual Studio?
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).
Chrome not loading new styles after css update
This may help. Open dev tools in browser then right click on refresh button of chrome. A menu will open. Select empty cache and hard reload.
If this is also not working then quit browser and try after relaunching.
Also look at chrome://appcache-internals/ for your page if there are some caches just delete those caches related to your page.
Chrome is not clearing cache
Development server was running various caching tools though they should have been turned off. After disabling them chrome started to work better and most of the time CTRL+F5 did the trick.
Chrome WON'T clear cache... ctrl + F5 doesn't seem to work either
I have had a similar problem. What I find is that I need to open up the Chrome developer tools and then hit Ctrl + F5. Only then is the cache refreshed.
Update
Also, I would recommend that you select "Disable Cache" in the developers tools ("Network" tab).
Related Topics
Font Awesome 5 Font-Family Issue
Should I Avoid Using "Text-Align: Justify;"
How to Remove an Element from the Flow
How to Reset CSS3 *-Transform: Translate(…)
How to Make My Font Bold Using CSS
Ie & Firefox - Custom Drop Down Could Not Remove Native Arrows
How to Change Default Bootstrap Fluid Grid 12 Column Gutter Width
How to Vertically Align a Progress Bar in Twitter Bootstrap
CSS Attribute Selector for Non-Empty Attributes
Multiple And/Or Nested Bootstrap Containers
How to Select First 2 <Li> Elements Using CSS
CSS Vertical-Align: Text-Bottom;
Are There Any CSS Standards That I Should Follow While Writing My First Stylesheet
How to Set a CSS Border on One Side Only
CSS - Opaque Text on Low Opacity Div
Bootstrap Cards with 100% Height and Margin Bottom