idb.filesystem.js icon indicating copy to clipboard operation
idb.filesystem.js copied to clipboard

Add optimistic storage implemented in FF26

Open jameslafa opened this issue 11 years ago • 0 comments

Firefox 26 is out today and added a new interesting feature :

IndexedDB can now be used as a "optimistic" storage area so it doesn't require any prompts and data is stored in a pool with LRU eviction policy, in short temporary storage Bugzilla details

To use this new feature, we need to give an configuration object as argument instead of a version 1 when we execute indexedDB.open.

Because the syntax of the function has change from numeric to object, the new version is not compatible with the old one. In consequence, on a version prior to FF26, an TypeError exception will be thrown and then we can fallback to the previous way of opening indexedDB.

Every tests pass on FF25 and FF26.

jameslafa avatar Dec 10 '13 20:12 jameslafa