E-Ink News Daily

Back to list

Persistent Databases in the Browser with DuckDB-Wasm and OPFS

DuckDB-Wasm now supports persistent databases in the browser via the Origin Private File System (OPFS), eliminating the need for manual serialization to IndexedDB. A database opened at an opfs:// path survives page reloads and browser restarts with write-ahead logging and checkpoints. The post includes a version caveat: latest npm build (1.33.1-dev57.0) has a bug; users should pin 1.32.0 or use 1.33.1-dev64.0+.

Background

OPFS is a browser-native per-origin sandboxed file system introduced in Chrome 106 (March 2023), offering random-access reads and writes. DuckDB-Wasm, the WebAssembly port of the in-memory analytical database DuckDB, previously lacked native persistence in browsers.

Source
Lobsters
Published
Sep 20, 2026 at 02:46 AM
Score
7.0 / 10