Does IE support indexedDB, WebSQL, or a database similar to SQLite?
Asked Answered
E

3

7

For Chrome, I can use IndexedDB and WebSQL, for Firefox, I can use IndexedDB, what about IE? I have developed an app that uses WebSQL and it works fine on desktop Chrome and Safari, iOS Safari and Android browser. Next, I want to port it to Desktop Firefox and IE. I'm considering IndexedDB, but finding out IE doesn't really support it. What alternative do I have?

Emmerich answered 11/6, 2012 at 22:17 Comment(1)
what versions of IE do you need to support?Inordinate
D
10

IE10 supports IndexedDB. You can also use localStorage in IE8+. For older versions, you can use proprietary userData behavior: http://www.javascriptkit.com/javatutors/domstorage2.shtml

Please note that WebSQL database is deprecated and specification is no longer maintained.

Disclaimer answered 11/6, 2012 at 22:21 Comment(2)
Most IE users are on IE8 or IE9 right now, so IndexDB doesn't help. localStorage does not support SQLite queries, so I have to rewrite my app not to use a local database? WebSQL is depreciated, but it is the only thing that currently work on desktop Chrome, Safari AND mobile. I would have loved to use IndexedDB, but I don't see any plan for mobile support. Isn't that the case?Emmerich
No announced plans, no. IDB in Chrome is backed by LevelDB so they'll probably have to get that on Android before you see Google contribute it to mobile WebKit. FF is SQLite-backed so that's possibly a good fit on Android. Who knows is there will ever be support on iOS. It wouldn't seem to jibe well with the native app model Apple favors anyways.Archon
A
3

As duri notes WebSQL has been given the incantation of doom**, but it's often the only practical technology for cross-platform local storage -- especially when dealing with mobile.

IE does not support WebSQL, and since the people who write the spec can't come to terms on an implementation you are not likely to see an implementation anytime soon. IE10 is not yet mainstream so neither is IndexedDB. (Moreover, IndexedDB suffers from two different implementations in Chrome (old) and FF (new) which makes even it not completely stable to develop on.)

localStorage is the only truly cross platform option, with mobile Opera being the only non-implementor. In my experience, you should not count on it performing well with medium- or larger-sized data sets.

** As with "McBeth" around theaters I'll ask that you never say these words near any IndexedDB implementation please: "The Web SQL Database specification is no longer being maintained and support may be dropped in future versions."

Archon answered 11/6, 2012 at 22:49 Comment(2)
I tend to think that WebSQL will have a much longer life than all the talk about being deprecated, just because it works and it is the only practical technology if you need mobile as well. Just don't see any browser maker removing it anytime soon.Emmerich
Totally agreed. People quote the spec of doom but don't ever talk about that code is often added but rarely removed.Archon
P
0

The google chrome team has been very supportive of IndexedDB, so I would expect Chrome for Android to get it soon if they don't have it yet. There's no need to have LevelDB "support" in Android, it's just another library like many others that Chrome uses.

Perjured answered 15/6, 2012 at 22:38 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.