Project: chromium Issues People Development process History Sign in
New issue
Advanced search Search tips
Issue 8742 Chrome should provide a simpler means for developers to clear the browser cache and set cache policy
Starred by 413 users Project Member Reported by slightlyoff@chromium.org, Mar 13 2009 Back to list
Status: Fixed
Owner: pfeldman@chromium.org
Closed: Aug 2011
Cc: vsevik@chromium.org, ben@chromium.org, slightlyoff@chromium.org, caseq@chromium.org, pfeldman@chromium.org, rvargas@chromium.org, stefanoc@chromium.org
Components:
OS: All
Pri: 2
Type: Feature

Restricted
  • Only users with EditIssue permission may comment.


Sign in to add a comment
Chrome Version       : 2.0.169.1
URLs (if applicable) :
Other browsers tested:
     Safari 3: Provides menu option
    Firefox 3: Bad UI, but about:config param for the persistent. Web 
Developer Toolbar extensions provides a solution
         IE 7: Provides a cache policy UI in options
         IE 8: Developer tools have a fast "clear the cache button" in 
addition to older cache config UI


Chrome makes it difficult for web developers to know that they're dealing 
with the latest version of resources that they may be actively working on. 
This problem has had various solutions on other browsers over time, but 
Chrome's default "Clear browsing data..." menu item duplicates FF's 
terribly slow UI for the common-case developer workflow need to just clear 
the cache. Safari provides a menu in the "File" dialog and a keyboard 
accelerator to clear the cache, and this seems like something we should 
support. Additionally, a button in the web inspector to clear the cache 
would be a big win.
 
Labels: -Type-Bug Type-Feature Mstone-X
Status: Untriaged
Comment 2 by jon@chromium.org, Apr 7 2009
Labels: -Area-Misc -Mstone-X Area-BrowserUI Mstone-2.1 Size-Small Fixit
Status: Available
Comment 3 by ben@chromium.org, May 14 2009
Labels: -Mstone-2.1 Mstone-X HelpWanted
Adding an item in the developer menu is fine, as is web inspector.
There should definitely be a "Clear browsing data..." button in the wrench context 
menu.

Even for non-developers.

When I'm using someone else's computer, I want to make sure all my account data is 
wiped clean after I use the browser.  I want a quick, easy, and conventional way to 
remove all my data. I shouldn't have to go to the "Wrench" then "Options" then 
"Personal stuff" then "Clear browsing data..."
@4 that's what incognito mode is for
Yes, I know I can use incognito, but most grandma's don't know that.  And especially 
here in places like Vietnam (where people think that pressing Refresh repeatedly on 
your desktop helps Windows load drivers faster), some people are stuck in their 
conventional ways.  We should be making it easier for people, even those who don't 
ever try to learn what incognito is.

Personally, I use incognito when I want to sign in to multiple accounts on 
Facebook/Gmail/etc without signing out of A, signing in to B, signing out of B, and 
signing in to A again.

Also just being able to clear the browser's cache any time you update an avatar or 
something is very helpful.  I just changed my Gravatar and nothing worked to reload 
the image.  Not CTRL+R, CTRL+F5, SHIFT+R/F5, etc, nothing.  I had to hunt for how to 
clear the cache.

As a developer, I would love to have an actual button next to the wrench and the page 
icons that did nothing but clear the cache.  But that wouldn't be for all users.
Comment 7 by oritm@chromium.org, Dec 18 2009
Labels: -Area-BrowserUI Area-UI-Features
Area-UI-Features label replaces Area-BrowserUI label
Labels: -Area-UI-Features Area-UI
Issue 45516 has been merged into this issue.
Labels: Feature-History
Still can't use Chrome as my main development browser because I can't easily disable cache which is essential when developing.

It should be part of the API so any of the developer extension toolbars could have a Disable Cache option.  Hum...like Firefox Web Developer Toolbar has had for years.
Labels: -Feature-History Feature-DevTools
Comment 13 by Deleted ...@, Aug 17 2010
help
Comment 14 by Deleted ...@, Aug 17 2010
help
Comment 15 by musu...@gmail.com, Aug 20 2010
I would like to see this feature added.
I think this feature needs to be a part of profile-per-tab feature, for example when a user opens a new tab, by default it has all data from the current profile, but with a click of a button user can create a brand new profile with a clean cache for a particular tab (this will be equivalent to clearing all cache and user data), and then kill it, if (s)he wishes.
Labels: -Size-Small -Fixit -HelpWanted
@masterov: this request is about a fast and convenient way of clearing the cache while developing, so that refresh reads data off network. It is worth filing upstream.
Comment 18 by tim....@gmail.com, Sep 22 2010
Just like in firefox with the 'Webdeveloper plugin' there is a button disable cache. This feature is now not available to Extension developers. 
Comment 19 by Deleted ...@, Nov 16 2010
Google Chrome doesn't need an easier way to clear the cache as much as it needs the option (command-line or otherwise) to completely DISABLE the cache.
--disk-cache-size=1 --media-cache-size=1 ??
Comment 21 by dinm...@gmail.com, Nov 17 2010
Bit annoying having to restart the browser when you want it disabled, though.  I'm always switching the cache on and off through Web Dev Toolbar in Firefox - some admin areas, for instance, are really slow without cache.
I personally like the cache disabled as a developer. I can't have the possibility that the page I'm viewing is stale when I've just updated some web site source and want to preview the changes. 

The problem with the command line options is that you may need to update multiple shortcuts (quick link, start menu, desktop).  Also, if Chrome is the default browser, it can be launched by clicking a link in an application or email, which won't use the shortcuts you've modified with the command line options.
I disagree with helgi.binary.is.

It's important to be able to empty the cache, then observe your site's behavior with respect to proper cache control.
Comment 24 by dinm...@gmail.com, Nov 17 2010
That's true, but being able to disable it is still important; there's often cases where you'll want to refresh something without cache several times in a row.

Disabling the cache *is* an important dev feature - it's the main reason a lot of people I've spoken to are sticking with Firefox for development.
Comment 25 by ccarp...@gmail.com, Nov 18 2010
Other than voicing support for easy cache clearing (per-site or domain ideally), one issue I've had with the existing cache-clearing mechanism is that post-loaded content, aka resources added via javascript, don't seem to be cleared correctly.  I find that I have to close the tab in addition to clearing cache, which is obtrusive for page development.  Sorry if that's off-topic.
Pavel: what's the prognosis for getting something like this in the Developer Tools in the near future?
Britt from Twitter here. Most of our devs have simply not been able to use Chrome due to this. What we seem to need is a clear set of APIs that allow a dev to disable the cache (ala WebDevToolbar in FF).

I'm currently tracking down something in which some cache is being maintained, even after —disk-cache-size=0 —media-cache-size=0. Maybe in-memory cache is still not being cleared?

Incognito doesn't apply here as it maintains a per-instance in-memory cache.
Comment 28 by Deleted ...@, Jan 4 2011
being able to disable javascript and cache are huge time savers for testers and developers.  this would be great functionality to have!
Labels: -Mstone-X Mstone-12
Status: Assigned
Pavel: Any update on this?
Labels: -Mstone-12 Mstone-11
Sorry if I'm stating the blindingly obvious or going OT, but isn't the correct cache behaviour to be completely transparent; i.e. to guarantee that What You Get is What There Is?

If I've updated a resource (e.g. Javascript file that's included on my page), I expect F5 on that page to give me the up-to-date content, even if the cache was not emptied immediately prior.

Up until my current version of Chromium (8.0.552.237) this is not always the case. In particular making a change to a Javascript file included from my page such that it becomes broken seems to make Chromium get "stuck" on the last working version of the file, further changes require considerable pain before Chromium displays What Is There.

Gav.
Comment 33 by meer...@gmail.com, Feb 7 2011
As a web developer this gets really annoying - but I find closing the tab and opening a new tab works fine and avoids the cache issue (this is Chromium on Linux, currently v10.0.648 but this seems to have been the case since v7 if not earlier).

So my solution is to have a nervous twitch that does the following (keystrokes shown as uppercase simply to make it easier to see 'l' is not '1' etc)

 Ctrl-Shift-I (close Developer Tools assuming it's open)
 Ctrl-L       (cursor to omnibox selecting current URL)
 Ctrl-C       (copy URL to clipboard)
 Ctrl-W       (close tab)
 Ctrl-T       (new tab, cursor automatically goes to the omnibox)
 Ctrl-V       (paste url)
 Enter        (navigate)

[ Looks like an emacs command M-x chrome-refresh :) ]

Of course it would be nice if the refresh call worked... and a keystroke to clear all breakpoints  would also be pretty handy as they seem to be preserved (by file and line number) but the code has usually moved around...

In the absence of a fix, anyone know how easy it would be to automate the above say as an extension ?? Or doesn't closing and re-opening the tab work for others ?


Comment 34 by meer...@gmail.com, Feb 8 2011
So, had a few minutes to spare and tried writing my first Chrome extension as described and it seems to work (for me).

I've published it here

  https://chrome.google.com/webstore/detail/kkhgjeaffbhdcpflajldaijabgclfnoa

if anyone wants to try it - it adds button to the toolbar that closes the current tab and then opens a new tab at the same position and navigates to the URL of the just-closed tab... for me this cures the caching issue.

If it doesn't work for you, first off my apologies, but also.. please let me know and I'd be interested to see if I can tweak it (for example, I originally created the new tab with the desired URL but that still had caching issues, so now I split the tab creation and URL navigation into 2 actions and that seems to make a difference).

Cheers

--
Tim


I landed http://trac.webkit.org/changeset/77922 upstream. Hitting Ctrl+Shift+R (Ctrl+F5) in the devtools window will reload the page ignoring cache.

@slightlyoff: Do we need cache policy switch or is this good enough?
Comment 36 by meer...@gmail.com, Feb 9 2011
I released a tweaked v1.1 of my Chrome extension that has an option (disabled by default) to intercept and act upon the Ctrl-F5 keystroke in addition to the toolbar button, but once change 77922 makes it into a production ready version of Chrome, I'll happily remove the extension (it was interesting seeing what's involved in writing extensions anyway).

Thanks for the change...

Thanks @pfeldman! I personally prefer a switch (I and many others are used to it from Firefox) , but this is certainly the next best thing.
How long does it take WebKit changes to make it to Chrome, and is there a way for us to track when it does?
@coolr... It is already in Chrome nightly (we pick WebKit daily). It'll take a week to get into the Dev Channel; it will hit stable with Chrome 11 (~late March). I doubt I'll be able to merge it into Chrome 10, but I'll try anyway.
@pfeldman: Javascript is still being cached. Is this the V8 Compilation Cache?
Labels: -Mstone-11 Mstone-12
Comment 41 by Deleted ...@, Mar 5 2011
I realize clearing browsing data and clearing cache aren't the same thing, but the former is A. more understandable to non-programmers and B. more useful to non-programmers (I think even moderately tech-savy people understand the concept of cookies and why they want to clear them periodically). I think the approach of Firefox is actually not bad in this respect -> clear recent history gives a popup which gives the option to clear cache among other things.

I think as the general public grows ever more used to the web in general, they'll want this to be an easy to access option as well. So I think just having it as an extension is insufficient. What makes sense is what all other browsers do, in one of the drop down menus (or given that Chrome only has one, in the only drop down menu) add an option for clearing cache.


Regardless of the needs of the general public, developers still can't develop until http://code.google.com/p/chromium/issues/detail?id=37711 is fixed.
Bump. I need to be able to turn off cache whilst testing .js/.css.
Labels: -Mstone-12 Mstone-13
Comment 45 by Deleted ...@, May 10 2011
I develop with chrome all the time. For clearing cache i use Ctrl  - Shift - Delete. Just as in other browsers.
Labels: -Mstone-13 Mstone-14
+infinity! Sorry, but I hate developing in Chrome because of the lack of this. I've tried extensions, CTRL+F5, CTRL+SHIFT+R, CTRL+R, SHIFT+F5, about:cache, close-the-tab-and-try-again, etc.. None reliably reload ALL files. I have metered Internet, so disabling or clearing my GLOBAL cache is unacceptable. I cannot believe this bug has been open for so long. It cannot be hard to provide options like "Disable Cache when debugging" or "Clear Cache for This Site" or "Never Cache This Site". Any or all of these would put this to bed - and keep us devs from wasting so much time. Please, please, please!
Comment 48 by bmoes...@gmail.com, Jun 22 2011
Want. Please.
Comment 49 by Deleted ...@, Jun 23 2011
Please please please. Firefox and even explorer have you beat here. Ridiculous. If it needs to stay out of typical user view then shove it in the dev tools. We all know where they are. Your dev tools are the best, and your browser is super fast. I love using it to dev with. It's almost perfect. Get this fixed and it will be.
For the unaware people. Do not flood the Issue by sending "Please!" "Me too" "+1" comments. Please, comment only on relevant matters. If you want this fixed, just star the issue, and it will (eventually) get higher priority.

Flooding the issue isn't helpful at all, and fills our inbox with trash.

Thanks!
Cc: vsevik@chromium.org caseq@chromium.org
Comment 52 by k...@google.com, Jul 28 2011
Labels: -Mstone-14 Mstone-15 MovedFrom-14
Punting out non-critical bugs.  Please move back to 14 if you believe this was done in error.
Status: Fixed
Upstream bugs: 
http://webk.it/63999 Add support for clearing cache and cookies from network panel.
http://webk.it/64097 Add support for disabling cache in web inspector.

There is now a checkbox for disabling cache in settings.
Network panel context menu now has clear cache and clear cookies actions.
Where exactly is the checkbox to disable cache? Is it available on all versions (i.e. platforms)? I'm on a Mac, and I'm not seeing that checkbox anywhere. I'm a web developer, and it would be a huge help if I could turn caching off entirely.
I also cannot find this setting, using Chrome 13.0.782.107 on Mac OS X 10.7 Lion.
Comment 56 by Deleted ...@, Aug 9 2011
Given that it's slated for Version 15, that is not a major surprise.
It is available on all platforms.
It is already available in dev channel now and you could expect it coming to beta and stable in the next few weeks.
it will be fixed in chrome 15 according to the milestone. 


chrome 14 was branched before that issue was fixed.
Labels: -Mstone-15 -MovedFrom-14 Mstone-14
It was added in M14 actually.
Comment 60 by meer...@gmail.com, Aug 9 2011
I can find the option in the new "Settings" that can be activated by a "cog" button at the bottom right hand side of the Developer Tools display next to the little error and warnings count icons in v14.0.835.29 (Chromium on Linux), which is near enough the latest release of the dev channel.
Why aren't more people using the keyboard shortcut CTRL+SHIFT+DELETE? Works great here, every time. Fast & easy. (as mentioned in comment #45)
As #60 stated, this is already available. Open the dev panel (F12), press the cog on the bottom right, check the "disable cache" item. It's available here (on 14.0.835.29 Windows), but I remember it being available for a few days now.

#61: Because it's cumbersome. When testing, people want to just click something and reload the page with no cache. Having to open an option screen on a new tab, click to empty the cache, then close the tab (and having to find the previous tab again) is a lot more annoying even with a shortcut.
CTRL+SHIFT+DELETE is slightly faster than using the menu but its still a multi-step process. First press the key combination, then check the settings in the new window it opened to make sure you clear only cache and not session too, and finally you press a button on screen to actually clear the cache. This is in fact significantly more difficult when testing small css changes during development than the single key combination to refresh in firefox. 

I'm very excited for a better solution to refreshing cache in chrome because it is the little things like this which are all that keep me in bed with firefox at this point.
CTRL+SHIFT+DELETE doesn't work on Mac, and there are a surprising number of developers (myself included) who use (voluntarily or otherwise) Macs for dev work.  There is no keyboard shortcut for clearing cache on the Mac, which is why it would be really nice if there was a setting for this. I'll watch for it in the stable release in the next few weeks - my company prohibits me from installing dev channels.
Mac: Command + shift + delete 


Oh my god... do you know that you are causing 306 (yes, THREE HUNDRED SIX) people with a bunch of e-mails?
Thanks for that email, litemini...@gmail.com
As one of those 306 people, I cannot say "thanks" enough for this. Beyond the basic PITA part here, I cannot simply dump all the browser cache (metered internet) so this one feature will be a world changer for me. Thanks! Thanks! ...!!
Comment 69 by Deleted ...@, Aug 9 2011
It's really a moot point now isn't it. Hotkey or not. Since this issue is fixed /unsubscribe.
Comment 70 by nrb...@gmail.com, Aug 13 2011
Thank you!
Comment 71 by Deleted ...@, Oct 31 2011
the caching solution via Cmd+Shift+Del is a joke!

1. press cmd+shift+del
2. check settings
3. mouseclick the button
4. change the tab
5. press refresh

What is the problem by providing a stupid simple shortcut? what is the problem? 5 steps where 1 could make it... i rly dont get the issue!
Please read comment 53 above. http://code.google.com/p/chromium/issues/detail?id=8742#c53
Issue 117516 has been merged into this issue.
Comment 74 Deleted
Comment 75 by raz...@gmail.com, Jun 6 2012
For the Chromium and Google teams, please clarify the effect this setting ("Disable cache") has when the dev tools window is opened vs. when it is closed.  As near as I can tell the setting only works when dev tools are open.  Please add a note about this to your documentation at https://developers.google.com/chrome-developer-tools/docs/network.
Project Member Comment 76 by bugdroid1@chromium.org, Oct 13 2012
Labels: Restrict-AddIssueComment-Commit
This issue has been closed for some time. No one will pay attention to new comments.
If you are seeing this bug or have new data, please click New Issue to start a new bug.
Project Member Comment 77 by bugdroid1@chromium.org, Mar 10 2013
Labels: -Area-UI -Feature-DevTools -Mstone-14 Cr-Platform-DevTools Cr-UI M-14
Project Member Comment 78 by bugdroid1@chromium.org, Mar 13 2013
Labels: -Restrict-AddIssueComment-Commit Restrict-AddIssueComment-EditIssue
Cc: stefanoc@chromium.org rvargas@chromium.org
Issue 94090 has been merged into this issue.
Sign in to add a comment