Re:Swarm.js and React – Real-time, offline-ready web apps
by hodoublesy on Tuesday October 14, 2014 @01:09PM
(#8454446)
I have had good luck with https://github.com/mozilla/localForage as an API abstraction
Re:Swarm.js and React – Real-time, offline-ready web apps
by nolanl on Tuesday October 14, 2014 @02:00PM
(#8454739)
PouchDB, ydn-db, IndexedDBShim, and Lawnchair will do this as well.
Web SQL may be "deprecated," but it's unlikely to be dropped by Apple or Google, since so many mobile web apps depend on it. Even the mobile version of Gmail uses Web SQL.
Also - these fallbacks are not exactly swappable. Its like swapping from a Database to a Filesystem as a fallback. Difficult to abstract into a single library/api.
And you still potentially leave out IE users if those are your options (depending on your IndexedDB needs).
IndexedDB to localStorage fallback might work - but again might not be an easy API abstraction.