WebSQL in Ionic

I’d like to use WebSQL in Ionic 2 like I did in Ionic 1, how can I do that?

1 Like

Short answer: You can’t.

Long answer: WebSql doesn’t exist in mobile, ionic 2 makes use of cordova’s SqLite plugin, there could be other ways but this is the way advised by ionic 2 in their docs, basically you use their wrapper around the plugin in order to use WebSql when serving the app to the browser, and use SqLite when in mobile, here’s the docs:


Ty for the explanation :smiley:

not found docs, does storage here refers to https://ionicframework.com/docs/storage/
its only local forage

Yes, read the rest of his answer. One of the engines it uses is WebSQL. If you want to only that, you can configure it.

Frankly, I can’t think of a reason anybody would want to mandate the WebSQL driver.