My favorites | Sign in
Project Home Downloads Wiki Issues Code Search
New issue   Search
for
  Advanced search   Search tips   Subscriptions
Issue 8742: Chrome should provide a simpler means for developers to clear the browser cache and set cache policy
301 people starred this issue and may be notified of changes. Back to list
Status:  Fixed
Owner:  pfeld...@chromium.org
Closed:  Aug 2011
Cc:  ben@chromium.org, pfeld...@chromium.org, slightly...@chromium.org, vsevik@chromium.org, ca...@chromium.org

Restricted
  • Only users with EditIssue permission may comment.


Sign in to add a comment
 
Project Member Reported by slightly...@chromium.org, Mar 12, 2009
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.
Mar 12, 2009
#1 anan...@chromium.org
(No comment was entered for this change.)
Status: Untriaged
Labels: -Type-Bug Type-Feature Mstone-X
Apr 7, 2009
#2 j...@chromium.org
(No comment was entered for this change.)
Status: Available
Cc: erik...@chromium.org b...@chromium.org
Labels: -Area-Misc -Mstone-X Area-BrowserUI Mstone-2.1 Size-Small Fixit
May 13, 2009
#3 ben@chromium.org
Adding an item in the developer menu is fine, as is web inspector.
Labels: -Mstone-2.1 Mstone-X HelpWanted
Oct 9, 2009
#4 nathanbr...@gmail.com
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..."
Oct 9, 2009
#5 erik...@chromium.org
@4 that's what incognito mode is for
Oct 9, 2009
#6 nathanbr...@gmail.com
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.
Dec 18, 2009
#7 or...@chromium.org
Area-UI-Features label replaces Area-BrowserUI label
Labels: -Area-BrowserUI Area-UI-Features
Feb 17, 2010
#8 lafo...@chromium.org
(No comment was entered for this change.)
Labels: -Area-UI-Features Area-UI
Jun 21, 2010
#9 sker...@chromium.org
 Issue 45516  has been merged into this issue.
Jun 28, 2010
#10 tfar...@chromium.org
(No comment was entered for this change.)
Labels: Feature-History
Aug 10, 2010
#11 leeejohn...@gmail.com
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.
Aug 10, 2010
#12 erik...@chromium.org
(No comment was entered for this change.)
Cc: -erik...@chromium.org pfeld...@chromium.org
Labels: -Feature-History Feature-DevTools
Aug 17, 2010
#13 cswhopw...@gmail.com
help
Aug 17, 2010
#14 cswhopw...@gmail.com
help
Aug 20, 2010
#15 MusU...@gmail.com
I would like to see this feature added.
Aug 27, 2010
#16 maste...@chromium.org
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.
Aug 27, 2010
#17 pfeld...@chromium.org
@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.
Labels: -Size-Small -Fixit -HelpWanted
Sep 22, 2010
#18 tim....@gmail.com
Just like in firefox with the 'Webdeveloper plugin' there is a button disable cache. This feature is now not available to Extension developers. 
Nov 16, 2010
#19 helgi.bi...@gmail.com
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.
Nov 17, 2010
#20 bachin...@gmail.com
--disk-cache-size=1 --media-cache-size=1 ??
Nov 17, 2010
#21 dinmore@gmail.com
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.
Nov 17, 2010
#22 vin...@murdico.net
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.
Nov 17, 2010
#23 feinb...@google.com
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.
Nov 17, 2010
#24 dinmore@gmail.com
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.
Nov 18, 2010
#25 ccarp...@gmail.com
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.
Dec 15, 2010
#26 slightly...@chromium.org
Pavel: what's the prognosis for getting something like this in the Developer Tools in the near future?
Cc: slightly...@chromium.org
Dec 15, 2010
#27 brittsp...@gmail.com
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.
Jan 4, 2011
#28 tha...@gmail.com
being able to disable javascript and cache are huge time savers for testers and developers.  this would be great functionality to have!
Jan 26, 2011
#29 pfeld...@chromium.org
(No comment was entered for this change.)
Status: Assigned
Owner: pfeld...@chromium.org
Labels: -Mstone-X Mstone-12
Feb 3, 2011
#30 brittsp...@gmail.com
Pavel: Any update on this?
Feb 4, 2011
#31 pfeld...@chromium.org
(No comment was entered for this change.)
Labels: -Mstone-12 Mstone-11
Feb 4, 2011
#32 gavofy...@gmail.com
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.
Feb 7, 2011
#33 meer...@gmail.com
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 ?


Feb 7, 2011
#34 meer...@gmail.com
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


Feb 9, 2011
#35 pfeld...@chromium.org
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?
Feb 9, 2011
#36 meer...@gmail.com
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...

Feb 9, 2011
#37 coolr...@gmail.com
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?
Feb 9, 2011
#38 pfeld...@chromium.org
@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.
Feb 9, 2011
#39 brittsp...@gmail.com
@pfeldman: Javascript is still being cached. Is this the V8 Compilation Cache?
Mar 4, 2011
#40 pfeld...@chromium.org
(No comment was entered for this change.)
Labels: -Mstone-11 Mstone-12
Mar 5, 2011
#41 therands...@gmail.com
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.


Mar 8, 2011
#42 brittsp...@gmail.com
Regardless of the needs of the general public, developers still can't develop until https://code.google.com/p/chromium/issues/detail?id=37711 is fixed.
Mar 28, 2011
#43 justin.h...@gmail.com
Bump. I need to be able to turn off cache whilst testing .js/.css.
Apr 4, 2011
#44 pfeld...@chromium.org
(No comment was entered for this change.)
Labels: -Mstone-12 Mstone-13
May 10, 2011
#45 t...@schitterend-media.nl
I develop with chrome all the time. For clearing cache i use Ctrl  - Shift - Delete. Just as in other browsers.
May 19, 2011
#46 pfeld...@chromium.org
(No comment was entered for this change.)
Labels: -Mstone-13 Mstone-14
Jun 19, 2011
#47 dongryp...@gmail.com
+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!
Jun 21, 2011
#48 bmoes...@gmail.com
Want. Please.
Jun 22, 2011
#49 aubby....@gmail.com
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.
Jun 22, 2011
#50 ceduardo...@gmail.com
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!
Jun 28, 2011
#51 vsevik@chromium.org
(No comment was entered for this change.)
Cc: vsevik@chromium.org ca...@chromium.org
Jul 27, 2011
#52 kerz@google.com
Punting out non-critical bugs.  Please move back to 14 if you believe this was done in error.
Labels: -Mstone-14 Mstone-15 MovedFrom-14
Aug 5, 2011
#53 vsevik@chromium.org
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.
Status: Fixed
Aug 9, 2011
#54 estherms...@gmail.com
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.
Aug 9, 2011
#55 kimslaw...@gmail.com
I also cannot find this setting, using Chrome 13.0.782.107 on Mac OS X 10.7 Lion.
Aug 9, 2011
#56 prencher
Given that it's slated for Version 15, that is not a major surprise.
Aug 9, 2011
#57 vsevik@chromium.org
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.
Aug 9, 2011
#58 pascal.h...@gmail.com
it will be fixed in chrome 15 according to the milestone. 


chrome 14 was branched before that issue was fixed.
Aug 9, 2011
#59 vsevik@chromium.org
It was added in M14 actually.
Labels: -Mstone-15 -MovedFrom-14 Mstone-14
Aug 9, 2011
#60 meer...@gmail.com
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.
Aug 9, 2011
#61 pixel...@gmail.com
Why aren't more people using the keyboard shortcut CTRL+SHIFT+DELETE? Works great here, every time. Fast & easy. (as mentioned in comment #45)
Aug 9, 2011
#62 zisfor...@gmail.com
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.
Aug 9, 2011
#63 breannad...@gmail.com
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.
Aug 9, 2011
#64 estherms...@gmail.com
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.
Aug 9, 2011
#65 PJ.Hober...@gmail.com
Mac: Command + shift + delete 


Aug 9, 2011
#66 litemini...@gmail.com
Oh my god... do you know that you are causing 306 (yes, THREE HUNDRED SIX) people with a bunch of e-mails?
Aug 9, 2011
#67 ad...@nathanbrauer.com
Thanks for that email, litemini...@gmail.com
Aug 9, 2011
#68 dongryp...@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! ...!!
Aug 9, 2011
#69 aubby....@gmail.com
It's really a moot point now isn't it. Hotkey or not. Since this issue is fixed /unsubscribe.
Aug 13, 2011
#70 nrb...@gmail.com
Thank you!
Oct 31, 2011
#71 norman.w...@gtempaccount.com
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!
Mar 13, 2012
#73 kan...@chromium.org
 Issue 117516  has been merged into this issue.
Jun 6, 2012
#75 raz...@gmail.com
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.
Oct 13, 2012
#76 bugdro...@chromium.org
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.
Labels: Restrict-AddIssueComment-Commit
Mar 10, 2013
#77 bugdro...@chromium.org
(No comment was entered for this change.)
Labels: -Area-UI -Feature-DevTools -Mstone-14 Cr-Platform-DevTools Cr-UI M-14
Mar 13, 2013
#78 bugdro...@chromium.org
(No comment was entered for this change.)
Labels: -Restrict-AddIssueComment-Commit Restrict-AddIssueComment-EditIssue
Sign in to add a comment

Powered by Google Project Hosting