Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

how to empty firefox dom localstorage

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?

like image 606
Thunder Rabbit Avatar asked May 01 '12 02:05

Thunder Rabbit


People also ask

How do I clear my local storage browser?

Press CTRL + Shift + Delete (alternatively: click More - More Tools - Clear browsing data). Choose a time range or select All time to delete everything. Next to Cookies and Cached folders, check the boxes. Click Clear data.

Where is Firefox local storage stored?

The DOM storage data is stored in the webappsstore. sqlite file in the profile folder. The profile folder is located in %APPDATA%\Mozilla\Firefox\Profiles\​ , named something like 321edcba. default , and within it, there's the webappsstore.


2 Answers

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.

like image 199
Rob W Avatar answered Oct 04 '22 04:10

Rob W


localStorage.clear(); // Capital S is required.

This will clear all key-value pairs.

like image 28
hamhamed Avatar answered Oct 04 '22 02:10

hamhamed