3 ms·
WebSQL should've just been Sqlite and the whole offline-first (and general app storage) ecosystem would've been so much nicer. Is there any hope of that happen
by parhamn 2y ago
WebSQL should've just been Sqlite and the whole offline-first (and general app storage) ecosystem would've been so much nicer.
Is there any hope of that happening? Instead of abstracting and over specifying sqlite, can the spec just specify a version of the SQLite API browsers should support and roll the version periodically?
- emn13 2y ago"Rolling the version periodically" is probably quite problematic for browsers. Kind of a key point of the web is that stuff if at all possible keeps working. Breaking changes like that are hard. Even if the spec just listed occasional version and the webpage could choose which one; that means a potentially tricky maintenance burden on browser to support old versions of a potentially no longer supported sqlite, and each version is another megabyte. Why not then just choose this solution, and let each website pick its own poison? If the concern is the repeated downloads of common resources, well, we've accepted that for other CDN's too, and a solution for shared caching of common dependencies would in any case be more valuable than merely for sqlite. The current approach seems better than a browser-provided version.
- justin66 2y agoVersioning was never really an issue. It's worth pointing out that Richard Hipp committed to creating and maintaining a flag in SQLite that would force SQLite to use whatever subset of SQL the WebSQL people settled on for their API. That would have of course worked independently of the SQLite version. (He also offered to write the SQL part of the spec.) https://news.ycombinator.com/item?id=15670808 https://news.ycombinator.com/item?id=15670808 I thought the reasons given for not moving forward with standardizing WebSQL and using a SQLite implementation were (and undoubtedly still are) very, very stupid so I'm not the right person to represent them here.
- simonw 2y agoI for one am glad WebSQL didn't establish itself. Now we get the most recent version of SQLite when we need it as a 410KB compressd WASM blob, as opposed to being stuck on browser-mandated versions of SQLite that might even be a decade old at this point.
- xyc 2y agoThey are not mutually exclusive though. WebSQL doesn't prevent anyone from loading a WASM blob. And while moving slowly, the browsers does deprecate old stuff and update implementation.
- deleted 2y ago[deleted]
- nikeee 2y agoWhile I love SQLite, one has to admin that it has several quirks that we should not put into every browser. So probably some sqlite-esque API would be nice.