Hi! Thanks for visiting my blog. If you've received any value from my content would you mind supporting my new startup by downloading our browser add-on? It's called PriceBlink and makes online shopping a breeze. You can watch it in action here and download it for Chrome, Firefox, IE, or Safari by going to PriceBlink.com. Thank you and I hope you enjoy!

Deleting Local Storage for Chrome Extensions

Nov 14

While testing our latest version of PriceBlink price comparison extension for Google Chrome we needed a way to delete our local storage. It’s not a problem to delete local storage programmatically, but we wanted to test a fresh install where the local storage object didn’t exist yet. The easiest way that I’ve found to do this is by manually deleting the storage file and restarting Chrome.

For Mac users the local storage file can be found in:

/Users/YOUR_USERNAME/Library/Application Support/Google/Chrome/Default/Local Storage

Within that folder you’ll see a bunch of files. To locate the file you want to delete you’ll need to find your extension’s unique identifier. This can be done by opening the Extensions tab in Chrome. For Mac users this is under Window > Extensions. Once you locate your extension simply click the arrow icon next to the extension name to expand details. You’ll notice an ID field that contains the extensions’s unique identifier. Now that you have the identifier you should be able to locate the local storage file in the folder I listed above. It will be of the format:

chrome-extension_[EXTENSION_ID_GOES_HERE]_0.localstorage

Simply delete this file and restart Chrome. The first time your extension reads from local storage you should see that your items are undefined and the first time you write to local storage the file will be created.

I know this isn’t the most elegant way to solve the problem so if you have any better alternatives then please post in the comments below.

Also, clearing browsing data in Chrome’s preferences does not clear local storage objects for extensions. That’s a good thing.

Leave a Reply