Closed efkan closed 9 years ago
(I know I'm answering an outdated question, but I hope this will help future visitors. I didn't use cordova-indexeddb
yet.)
You can use IndexedDB in a web browser if that browser supports it. Since Cordova instantiates a WebView (the stock browser) of your target platform, whether or not a Cordova application provides IndexedDB by default depends on the platform. Stock browsers are often customized by device manufacturers and rarely get updated, thus you shouldn't expect recent Web APIs to be available to them.
This kind of inconsistency is exactly what we want to avoid when using Cordova. cordova-indexeddb
's approach consists in shimming IndexedDB using IndexedDBShim
, which relies on Web SQL. This may be what you want, but please note that "[WebSQL] is no longer in active maintenance and the Web Applications Working Group does not intend to maintain it further". In short, this means that old and new browsers may or may not support it - test if it works for your target devices.
A good sharing. Thanks anyway.
Thanks for providing the answer, not sure how I missed this question; Sorry about that!
Hi,
First of all, thanks for that huge works.
I don't have great knowledge regarding Cordova. I have two questions. If you may response to them when you are available, I would be appreciated.
I wonder that can I use IndexedDB in Cordova without cordova-indexeddb? The following link to show how to use indexed-db in a HTML application. http://www.html5rocks.com/en/tutorials/indexeddb/todo/#
If it works for HTML, it can works for Cordova. Doesn't it?
Have a nice day...