Best IndexedDB Wrappers [closed]

I wrote the db.js library so I might be a bit biased but it’s main goals were to: Add Promise based callback handling rather than wiring up events to onsuccess and the like Add a simple and fluent API for querying that relied on method chaining and ultimately looked like JavaScript code Use a JavaScript … Read more

In IndexedDB, is there a way to make a sorted compound query?

The term compound query as used in this answer refers to an SQL SELECT statement involving more than one condition in its WHERE clause. Although such queries are not mentioned in the indexedDB specification, you can approximate the behavior of a compound query by creating an index with a keypath that consists of an array … Read more

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 can I remove a whole IndexedDB database from JavaScript?

As far as I can tell, one should use indexedDB.deleteDatabase: var req = indexedDB.deleteDatabase(databaseName); req.onsuccess = function () { console.log(“Deleted database successfully”); }; req.onerror = function () { console.log(“Couldn’t delete database”); }; req.onblocked = function () { console.log(“Couldn’t delete database due to the operation being blocked”); }; I can confirm that it works with PhantomJS … Read more

Developing a HTML5 offline storage solution for iOS/Android in 2011

I would recommend checking out the JayData library, that actually has the exact purpose of creating a storage agnostic data access layer for mobile devices. JayData provides an abstraction layer with JavaScript Language Query (JSLQ) and JavaScript CRUD support and let’s you work on the exact same way with different offline and online data store … 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

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)