-
Notifications
You must be signed in to change notification settings - Fork 22
Deprecate and remove WebSQL #46
Description
The WebSQL spec has been deprecated with a big scary warning since 2011. We had a fairly long discussion with Google folks recently about WebSQL usage on the web (@drufball / @RByers feel free to share that usage data if you'd like 😃). In any case, usage still remains nonzero in 2017, although Chrome has dropped support inside of web workers in Chrome 39 and Safari dropped it in Safari 9.
I believe that adding a console warning to openDatabase() will help hasten the end of WebSQL. Currently many developers are unaware of WebSQL's deprecation, because they write (for instance) Ionic/Cordova apps where the SQLite Plugin is very much alive and well, and then when they develop locally in Chrome they use openDatabase() because it's largely API-compatible.
This is bad for the web. Folks continue to write web applications that are effectively WebKit/Blink-only. They may start by writing a hybrid iOS+Android app, and then discover when they want to take it to the web (e.g. as a PWA) that they have to rewrite it for compatibility with Firefox/Edge. Some major websites (e.g. GMail) are still using WebSQL.
My proposal: if the site calls openDatabase(), show a warning similar to the one for non-passive event listeners:
I wouldn't recommend adding a warning for any openDatabase usage, because IDB wrappers like PouchDB and LocalForage use typeof openDatabase as part of their feature detection. But if the site calls openDatabase(), it would be great to show a warning and eventually remove support entirely.
In terms of webcompat, it may be good to align with market penetration of Safari 10.1, since both PouchDB and LocalForage are considering 10.1 as the cutoff for IDB support.
/cc @aliams
