Google Chrome CSS Doesn't Update Unless Clear Cache

Google chrome css doesn't update unless clear cache

  1. Open DevTools
  2. Open Settings (bottom right or use F1 shortcut)
  3. 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.

Sample Image

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



Leave a reply



Submit