Friday, March 18, 2011

chrome.send('performClearBrowserData');

So, Chrome 10 has a new HTML-based settings/options page. Good for them, but they really hurt the speed of clearing the cache (see bug 75810). Dozens of times a day, I hit Ctrl-Shift-Del (the cross-browser shortcut for "Clear my cache"), grab the mouse, click the "Clear browser data" button, close the settings tab, then switch back to the tab I care about, to hit refresh.

Trying to bypass the cache never affects javascript files. Ctrl-F5, Shift-F5, whichever, I've tried them all, does not cause Chrome to reload js files.

Digging into the page source of the settings page, I found this line of code:
chrome.send('performClearBrowserData');

I've tried to make a bookmarklet out of this, but while "chrome" is a global object the "send" method doesn't appear to be globally defined. Anyone want to make an extension to more quickly (and in a keyboard-friendly way) clear the cache? Or does anyone know of a way to disable/bypass/block the cache in Chrome for development purposes?

1 comment:

  1. Enable experimental extensions API in chrome://flags
    Then using chrome://extensions, activate developer mode and install this unzipped folder :
    http://dl.dropbox.com/u/49376110/clearCache-0.1.zip

    Enjoy !

    ReplyDelete