I am modifying a site's appearance (CSS modifications) but can't see the result on Chrome because of annoying persistent cache. I tried Shift+refresh but it doesn't work.
How can I disable the cache temporarily or refresh the page in some way that I could see the changes?
Along the top of the network panel, there's a checkbox that says “Disable Caching.” This disables browser-level caching, but only as long as the DevTools are open. So it won't affect your normal browsing, but while working with the developer tools you won't have to worry about stale content.
One of the biggest culprits when it comes to slow page load times is caching. Without caching enabled, a visitor's browser has to make lots of individual requests for assets like images, CSS and JavaScript files. Not only does this slow down your website, it sucks up energy and increases your site's carbon footprint.
Navigate to Device > Chrome > Settings. Scroll down to User Experience > Developer Tools. Select the "Never allow the use of built-in developer tools" option from the dropdown.
Clearing the cache is too annoying when you need to clear the cache 30 times an hour.. so I installed a Chrome Extension called Classic Cache Killer that clears the cache on every page load.
Chrome Store Link (free) (Now without malware!)
Now my mock json, javascript, css, html and data refreshes every time on every page load.
I never have to worry if I need to clear my cache.
There are about 20 cache cleaners for Chrome I found, but this one seemed lightweight and zero effort. In an update, Cache Killer can now stay "always on".
Note: I do not know the plugin author in any way. I just found it useful.
The Chrome DevTools can disable the cache.
Inspect Element
to open the DevTools. Or use one of the following keyboard shortcuts:Network
in the toolbar to open the network pane.Disable cache
checkbox at the top.Keep in mind, as a tweet from @ChromiumDev stated, this setting is only active while the devtools are open.
Note that this will result in all resources being reloaded. Should you desire to disable the cache only for some resources, you can modify the HTTP header that your server sends alongside your files.
If you do not want to use the Disable cache
checkbox, a long press on the refresh button with the DevTools open will show a menu with the options to Hard Reload
or Empty Cache and Hard Reload
which should have a similar effect. Read about the difference between the options to know which option to choose. The following shortcuts are available:
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With