10

I'm trying to clear my local storage in Firefox 13.0 so I can continue using Lawnchair.

In Firebug [Dom] tab, I have been manually deleting properties from 'localstorage' key, but it takes about 10 seconds per delete (only 454 * 10 seconds to go!). (I hoped I could release enough space to let Lawnchair.nuke() do its job, but haven't been able to so far.)

I tried visiting about:config to turn off and back on localstorage but that didn't delete what was in there.

How can I mass-delete local storage for one website in Firefox?

2 Answers 2

16

Open the built-in console, CtrlShiftK (it's faster than Firebug), and paste the following code:

while (localStorage.length) localStorage.removeItem(localStorage.key(0));

This snippet will delete all localStorage key-value pairs on the given website.

Sign up to request clarification or add additional context in comments.

2 Comments

@ThunderRabbit localstorage.clear() should also do the same thing.
now, when I do that in Firefox 26 there is error in console: "Error: The operation is insecure."
11
localStorage.clear(); // Capital S is required.

This will clear all key-value pairs.

1 Comment

Awesome one thing though. Make sure you put a capital S or it won't work.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.