1

I am trying to create a bookmark that will open the ClearBrowserData in Chrome in a new window, so far I have managed to get this,

javascript:window.open("'chrome://chrome/settings/clearBrowserData'","_blank","toolbar=no,menubar=0,status=0,copyhistory=0,scrollbars=yes,resizable=1,location=0,Width=450,Height=450") ;

But somehow it will not work but will open a blank window, what am I doing wrong?

Kindly note that I want this to work with one click, and not with a shortcut.

8
  • Try "_tab" instead of "_blank". Try also to Allow all pop-ups.
    – harrymc
    Jan 6, 2013 at 8:37
  • Sorry mate, it didn't work
    – user181734
    Jan 6, 2013 at 14:40
  • I don't have Chrome so can't test, but what about doing instead of window.open : chrome.tabs.create({url:'chrome://settings/clearBrowserData'}) ?
    – harrymc
    Jan 6, 2013 at 14:51
  • Still not working :(
    – user181734
    Jan 6, 2013 at 15:27
  • 1
    Then I believe that Chrome simply does not allow this in Javascript as a security feature. But let's wait and see if somebody else has more info on the subject.
    – harrymc
    Jan 6, 2013 at 16:29

4 Answers 4

5

A Chrome developer has confirmed to me that this will not work as already explained in the comments earlier, and he advised me to use the ClearBrowserData extension.

2
  • 1
    Then the deleted answer by @daverook is correct. It currently needs 2 more undelete votes.
    – harrymc
    Jan 10, 2013 at 12:31
  • 1
    That answer is undeleted now.
    – harrymc
    Jan 12, 2013 at 19:42
3
+25

I don't think this is possible.

After tying it myself, and then reviewing similar posts I am confident it can't be done, simply because it could be a security vunrability.

0
3

For those that do want a shortcut it's:

Ctrl+Shift+Delete on windows

Cmd + Shift + Backspace on OS X

3
  • +1 for a faster solution and using the <kbd> tag ;)
    – booyaa
    Jan 11, 2013 at 9:47
  • 1
    Cmd + Shift + Backspace on OS X
    – kavun
    Oct 20, 2015 at 16:38
  • @kavun, thanks, I've added the OS X shortcut to my answer
    – Sam Hasler
    Nov 6, 2015 at 9:58
1

I've had the following URL bookmarked since I got version 23 and it works every time.

chrome://chrome/settings/clearBrowserData

Just use right-mouse-button to select "Open in new tab" or click Middle-Mouse-Button on 3-Button Mouse

You must log in to answer this question.