Specifically cordova, Android + iOS
localStorage
- Best support – http://caniuse.com/#search=localstorage
- Not very powerful – name/value pairs, size limits (~5mb)
- Shim which backs with WebSQL/IndexedDB to bypass some limits – http://mozilla.github.io/localForage/#localforage
WebSQL
- Ok support (No IE / Opera / Firefox) – http://caniuse.com/#feat=sql-storage .
- Sadly, deprecated since 2010 – http://www.w3.org/TR/webdatabase/
- Cordova plugin alternative – https://github.com/brodysoft/Cordova-SQLitePlugin
IndexedDB
- Sad, patchy support. Also not supported in iOS 7 – http://caniuse.com/#feat=indexeddb
- Horribly broken in iOS 8. – http://www.raymondcamden.com/2014/9/25/IndexedDB-on-iOS-8–Broken-Bad
- Only key-value pairs
- Polyfill – https://github.com/axemclion/IndexedDBShim , but broken with workaround on iOS 8 – https://github.com/axemclion/IndexedDBShim/issues/167
Interesting alternatives: