News for hackers. Stuff that matters.
Re:SQLite in the browser with WASM/JS - OFFICIAL by Existenceblinks on Friday October 28, 2022 @04:29PM (#33377473)
> persistent

Question: is it really persisted indefinitely? And will this SQLite file be portable (import and export to somewhere else) ?

Re:SQLite in the browser with WASM/JS - OFFICIAL by srcreigh on Friday October 28, 2022 @10:26PM (#33380394)
It’s not persistent everywhere. On iOS the data is deleted after 7 days of inactivity on a website. It’s treated like a cache.

https://webkit.org/blog/12257/the-file-system-access-api-wit...

https://web.dev/storage-for-the-web/#:~:text=Starting%20in%2....

Re:SQLite in the browser with WASM/JS - OFFICIAL by tehbeard on Saturday October 29, 2022 @04:43AM (#33382195)
Missed one part from web.dev

> ...This eviction policy does not apply to installed PWAs that have been added to the home screen.

Re:SQLite in the browser with WASM/JS - OFFICIAL by sgbeal on Saturday October 29, 2022 @02:26AM (#33381514)
> And will this SQLite file be portable (import and export to somewhere else) ?

sqlite's storage format is independent of the underlying device. OPFS is "just another backend" and the only tricky part of implementing it was that OPFS's API is largely asynchronous and sqlite3 requires synchronous I/O. The db that's stored in OPFS is exactly what would be stored on your hard drive if you were operating outside of the browser.