How to delete Web SQL Database in Google Chrome

When I was developing my Google Chrome extension at one point I decided to switch to Web SQL because before that I was storing all my data (dictionary of around 5600 items) in a JSON array. When I first started using Web SQL I realized that managing databases is quiet tricky.

Although, Web SQL database is just a normal SQLite database, Chrome doesn't allow you to remove it in Developer Tools (which would be useful if you're testing your application). I don't think it's a bug, you can't delete database because there might be an extension's background page using it at the moment.

Where's the database?

Google Chrome is storing all Web SQL databases in:

Windows Vista or 7: \Users\_username_\AppData\Local\Google\Chrome\User Data\Default\databases
Windows XP: \Documents and Settings\_username_\Local Settings\Application Data\Google\Chrome\User Data\Default\databases
Mac OS X: ~/Library/Application Support/Google/Chrome/Default/databases
Linux: ~/.config/google-chrome/Default/databases

I thing on Linux or Mac OS it'll be similar.

In my case folder contains databases:

http_html5demos.com_0
http_www.b-reel.com_0
chrome-extension_mlafjglckd...pfld_0

Obviously first two are databases for domain html5demos.com and www.b-reel.com, while the last one is my extension's database.

If you want to see what's inside your database use any SQLite database manager (like Lita).

How to delete it?

If you want to delete any database you can, but keep in mind that you have to first close tab with that particular website (you can't delete database for html5demos.com what you're actually watching it at the moment).

With extensions it's exactly the same. If you want to delete the database, you have to close all Chrome Windows or just disable extension which database you want to delete.

blog comments powered by Disqus