4 ms·
> Sadly, in the browser SQLite has been kicked to the curb, replaced by IndexedDB Are you thinking of WebSQL? I don't remember a SQLite interface client-side i
by dahart 9y ago
> Sadly, in the browser SQLite has been kicked to the curb, replaced by IndexedDB
Are you thinking of WebSQL? I don't remember a SQLite interface client-side in any browser. I might be wrong, but I thought IndexedDB was originally implemented on top of SQLite in both Chrome and Firefox. I think Chrome moved to a different backing store, but that has no bearing on the API.
- virtualwhys 9y ago> Are you thinking of WebSQL? Yes, exactly, but Web SQL uses SQLite as the backing store. IndexedDB is its own thing, a standalone key/value store, nothing to do with SQLite.
- gcp 9y agoIndexedDB may be backed by SQLite. I think it likely is in Firefox?
- tejasmanohar 9y agoSQLite has been ported to the browser via Emscripten. I’ve seen it used in a couple niche projects (generally those that revolve around the SQL language), but I don’t remember it being a standard or even a primary use of SQLite. [0]: https://github.com/kripken/sql.js/ https://github.com/kripken/sql.js/
- virtualwhys 9y agoI'm aware of it, nice project, but 2.6MB + in memory only storage, no thanks.
- hajile 9y agoIt shouldn't be super difficult to backup/restore your db from localstorage using a dataURL. https://hacks.mozilla.org/2012/02/saving-images-and-files-in-localstorage/ https://hacks.mozilla.org/2012/02/saving-images-and-files-in...
- kbenson 9y agoAt that point, why wouldn't you just look for some SQL to LocalStorage API/shim, since it's bound to be faster than (and likely more stable with regard to page resets than) putting a full SQL engine in place that just serializes to a LocalStorage object anyway?
- coleifer 9y agoSure, but that's got to be a massive download. Probably not really an option for most sites.
- gcp 9y agoAre you thinking of WebSQL? I don't remember a SQLite interface client-side in any browser. Well, yes and no. The whole problem with WebSQL was that it effectively meant using SQLite and never anything else that wasn't completely bug compatible. So the whole problem with WebSQL was that it was, de facto, a web standard built around giving an SQLite interface client-side.