WebSQL in Ionic


#1

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


#2

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:

http://ionicframework.com/docs/v2/platform/storage/

#3

Ty for the explanation :smiley:


#4

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


#5

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.


#6

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