How to access Google Chrome’s IndexedDB/LevelDB files?

Keys in leveldb are arbitrary binary sequences. Clients implement comparators to define ordering between keys. The default comparator for leveldb is something equivalent to strncmp. Chrome’s comparator for Indexed DB’s store is more complicated. If you try and use a leveldb instance with a different comparator than it was created with you’ll observe keys in … Read more

How to create multiple object stores in IndexedDB

You need to open the database to check it’s current version and open it again with version + 1 to trigger the upgrade. Here is the sample code: function CreateObjectStore(dbName, storeName) { var request = indexedDB.open(dbName); request.onsuccess = function (e){ var database = e.target.result; var version = parseInt(database.version); database.close(); var secondRequest = indexedDB.open(dbName, version+1); secondRequest.onupgradeneeded … Read more

Storage limits on Chrome browser

Update May 2020: Chrome now lets an origin use 60% of the storage device’s space (Real nitty gritty: “storage device” is the partition containing the chrome profile directory). Updated article here https://web.dev/storage-for-the-web/#how-much The rule of thumb is 6% (edit 2015-Jul: was 10%) of the available space on the user’s hard drive, less if your origin … Read more

Maximum item size in IndexedDB

I don’t think there’s a specific limit for a size of a single item, only a global limit. The rules regarding the global limit have changed since this answer was originally written. The up-to-date docs are on MDN – depending on the available disk space, the “group” limit (for the given domain, including all of … Read more

Storing Image Data for offline web application (client-side storage database)

Results Offline blob cache for PNG slippy maps Testing 171 PNG files (total of 3.2MB) Platforms tested: Chrome v24, FireFox 18, IE 10 Should also work with Chrome & FF for Android Fetch from web server using XHR2 (supported on almost all browsers) for blob download from web server I went with XHR2-Lib by Phil … Read more