idb.filesystem.js
idb.filesystem.js copied to clipboard
Add optimistic storage implemented in FF26
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.