Add optimistic storage implemented in FF26 #29
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.