74

I like using Chrome as my everyday browser, as well as for web dev work. I'd like to be able to prevent Chrome from caching anything from localhost (or really, any arbitrary host name) so that I don't have to hard-refresh (Ctrl-Shift-R) all the time.

Is this possible? How?

1
  • I have the same question, I use johnnycache for FireFox, but something like that for Chrome would be nice Sep 30, 2011 at 8:21

9 Answers 9

30

You can't turn off the cache discriminately, but as of v15, you can turn it off completely via a settings panel that you access by clicking the gear button in the lower right corner of the developer tools window. On the network panel of the developer tools, you also have the option to clear cache from the right-click menu with only a confirmation dialog (i.e. it doesn't pop up the preferences tab the way "Clear Browsing Data" does.

Update: looks like this is now a checkbox on the developer tools network tab itself: enter image description here

5
  • I never noticed this before, really useful.
    – Nicholas W
    Feb 2, 2012 at 12:22
  • 12
    another neat hidden chrome feature - When developer tools is open, you can right-click the refresh button for some additional options Feb 5, 2013 at 15:29
  • 5
    Alas, in the current version of Chrome, the option now reads "Disable cache (while DevTools is open)". Not so useful anymore.
    – user9528
    Mar 10, 2014 at 19:41
  • I see no option to clear cache from the right-click menu of the Network panel. Aug 12, 2020 at 13:19
  • Looks like the developer option to clear cache from the network tab right-click menu may be gone (or have moved somewhere I can't find it), but you can now totally disable caching from the network tab via a prominent checkbox. Aug 14, 2020 at 16:32
20

This is already possible if you switch to Incognito mode for that site/host.

Ctrl + Shift + N

Viewing a site in Incognito mode should give you a clean slate void of any cached items and images.

If you're in a session, then it will reset it for you too. So you may want to watch for that when developing.

But if you really need to disable it on a per-site basis, then no. It's not currently possible.

1
  • 14
    To be blunt, incognito is even more of a pain than Ctrl-Shift-R.
    – Matt Ball
    Mar 17, 2011 at 15:57
7

Why not use Chrome profiles (aka "users")?

Configure one to be your "dev" profile (with no caching). You can enable a cache-killing plugin. You can disable cookies too. When it's time for a dev session, use that profile. Then when it's time to chill simply switch the profile back. All profiles can be run simultaneously.

This is also SUPER handy for testing purposes.

Assigning shortcuts and keyboard shortcuts to switch back-and-forth is icing on the cake.

Now if you really want to be slick you could have multiple user profiles for different projects/environments all at once (i.e., one for JS, one for server-side, etc... multiple monitors a must). Better use the superuser icon if this is you. ;-)

3
  • and in this profile, you can configure it to ignore dns caching as well
    – Brad Parks
    Sep 24, 2015 at 12:36
  • Good Idea, but the plugin you are linking to is malware... Look at the underscore-1.8.3.js file included as part of the distro. There are chunks of obfuscated code littered throughout the file which contact Dropbox, tracking servers, Yandex.ru, and more. See lines 1660-1870. This extension is sending your browsing history and more to Russian sources including. api.rtbmediatracker.com mc.yandex.ru/watch/… Jun 22, 2017 at 23:20
  • @RabbiShuki Wow, thank you very much, removing the link reference now to the cache-killing plugin. Kol tuv from Cleveland Jun 25, 2017 at 4:57
6

Disabling the cache from the developer tools settings in Google Chrome does not prevent caching of images, I've noticed. It only disables caching of CSS, JavaScript, and markup. Incognito mode is likely the most effective way of ensuring you're dealing with an uncached webpage.

2
  • 1
    Also useful to know. I guess most developers only care about css, js, etc. So that's why it's limited to those. I'm surprised there's no extension...
    – isaaclw
    Aug 30, 2012 at 19:00
  • In Chrome 26, caching also appears to be disabled even for images. I see 200 OK get requests for all images on every page view. Can anyone else confirm?
    – NickG
    May 9, 2013 at 12:19
1

Take a look at Super-Cache chrome extension which allows to customize caching policy per host

From docs: Override caching policy that has been set on the server. Select a host on which the caching is required and all requests from a page with that host will be cached.

2
  • That's exactly what I was looking for! Per host cache policies, thanks a lot! Apr 21, 2020 at 12:25
  • This doesn't work at all. It's useless.
    – Ken Sharp
    Mar 29 at 9:49
0

Take a look at Chrome Cache Killer extension.

This extension automatically clears your browser cache before loading a page. Can be enabled/disabled with a mouse click.

It works very well and solved me lots of headaches when developing web sites since Chrome keyboard shortcuts to clear the cache don't seem to work very well. I found it when looking for a solution to Chrome cache problems.

2
  • 1
    Are you associated with this project in any way? Why do you recommend it? It may be a great tool, but if you include what it does as well as pros/cons in your answer, it will add value to your answer. Jul 22, 2013 at 10:39
  • Link leads to a 404.
    – Phil
    Jun 28, 2018 at 21:42
0

I don't know of a direct way, but you can download the Super-Cache Chrome extension and then go to its permissions page. There, you can change its Site Access to On specific sites and enter a list of sites for it to disable cache for, and the rest will remain untouched. To make the extension block all caching on those sites, you also have to click on its icon and change everything to No store, then save.


Site settings for Super-Cache

-1

This option works if you own the website (in which case you're probably updating the same page a lot which causes it to cache).

<meta name="robots" content="noarchive">

Add this string of code to your <head> and it should do the trick.

-1

I use this chrome extension. Note u will have to go into the extension options first and add the URL of the site you want to disable cache on.

Extension Link - https://chrome.google.com/webstore/detail/no-cache/ogbfmfambmmhfdpfokohebghmcdbodbh

1
  • As it’s currently written, your answer is unclear. Please edit to add additional details that will help others understand how this addresses the question asked. You can find more information on how to write good answers in the help center.
    – Community Bot
    Sep 25, 2021 at 17:48

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .