1.118 Browser Offline Storage & Service Workers#
Platform APIs and JavaScript libraries for keeping a web app working offline, with browser quota and eviction rules, bundle size per library and a maintenance check.
Last verified 2026-10-05: findings checked against their sources.
Evidence: measured, method not yet published. The numbers here were produced by probes run on a stated machine; the harness is not in the public repository yet, so a reader cannot re-run them.
At a glance#
| Library | Best for | Verdict | Latest release |
|---|---|---|---|
| Workbox | App-shell and runtime caching of any PWA | Safe default; one or two releases a year (7.4.1, 2026-05-04) | 7.4.1 · 2026-05-04 |
| Dexie | Records with indexes and reactive UI | Strong; merging steadily, low lock-in | 4.4.7 · 2026-10-19 |
| idb / idb-keyval | Minimal wrappers; settings and drafts | idb last released 2025-05-07 with 11 open and no merged PRs since March; idb-keyval current | 8.0.4 · 2026-10-06 |
| localForage | Legacy projects | Stalled; last release 2021-08-18, 35 open PRs and none merged since 2026-03-01 | 1.10.0 · 2021-08-18 |
| RxDB | Replication to an existing backend | Very active; IndexedDB and OPFS storages are premium | 17.6.0 · 2026-10-05 |
| PouchDB | CouchDB backends | Repository active; latest npm release 2024-06-21 | 9.0.0 · 2024-06-21 |
| SQLite WASM (official, wa-sqlite) | Relational and full-text queries in the browser | Strongest engine; worker-only persistence and connection limits are the cost | 3.54.1-build1 · 2026-10-19 |
Latest release observed from npm in 2026-11.
What the research found
- Browser eviction rules, not the library, decide whether offline data survives. Safari deletes script-written storage after 7 days without user interaction on sites in a browser tab; installed Home Screen web apps are exempt. — An iPhone user can lose a week-old offline app’s data. Ask for install, call persist(), keep a server copy or an export path.
- Quota is now large on every engine: about 60% of disk per origin on Chromium and Safari 17+, and the smaller of 10% of disk or 10 GiB for Firefox best-effort data. web.dev still states Firefox 2 GB and Safari about 1 GB. — Do not hard-code either figure; read navigator.storage.estimate() on target devices.
- Bundle cost spans 352 bytes to 81.8 kB in gzip across the data libraries: 352 bytes (idb-keyval), 32.7 kB (Dexie), 81.8 kB (RxDB with Dexie storage), plus an 869 kB binary for SQLite WASM. — Choose the lightest layer that covers the queries; the features cost bytes.
- RxDB’s free build has no IndexedDB or OPFS storage; those are premium. localForage shows a stall and idb has no merges since March. — Price RxDB’s storages before choosing it for speed; migrate new work off localForage.
- Background Sync is limited availability on MDN, and persist() is granted by silent heuristics on Chrome and Safari but by a user prompt on Firefox. — Build an app-level retry queue and ask for persistence at a meaningful moment.
What the research recommends
Default — Choose by layer: Workbox for the app shell, the lightest data layer that fits (idb-keyval, Dexie, or SQLite WASM on OPFS), Cache Storage or OPFS for files, and persist() plus an export path for anything irreplaceable.
| Persona | Pick |
|---|---|
| offline first field data app | Dexie with an outbox table, persist() after first save, installed PWA on iOS; RxDB or PouchDB when the backend matches their replication. |
| pwa on flaky networks | Workbox through the build plugin with per-route strategies and expiration; idb-keyval for small state. |
| large asset media cache | Cache Storage with workbox-range-requests for URL-addressed media, OPFS for files edited in place, a small catalog in IndexedDB; estimate() before downloads. |
| local first notes app | Dexie with liveQuery, or SQLite WASM on OPFS (opfs-sahpool) for search and SQL; choose sync separately. |
bundle size gzip bytes
- idb keyval: 352
- idb: 1367
- workbox sw precache routing strategies: 5764
- localforage: 9794
- dexie: 32695
- pouchdb browser: 43095
- rxdb core localstorage: 45435
- rxdb core dexie: 81797
- sqlite wasm js glue: 65473
Explainer
Browser Offline Storage and Service Workers: Domain Explainer#
What problem this solves#
A web page normally needs the network twice: to fetch the app, and to read and write the user’s data. Offline support replaces both with local copies. A service worker intercepts requests and answers from a cache; a local database holds the records. The hard part is not the API calls. It is that the browser owns the storage and may delete it.
Key concepts#
Service worker. A script the browser runs in the background for a site. It sees every request the site’s pages make and can answer from a cache, the network or both. It is the usual way to serve a page with no connection.
Cache Storage. Named stores of request/response pairs. It does not expire entries on its own and does not honor HTTP cache headers (source: https://developer.mozilla.org/en-US/docs/Web/API/Cache, accessed 2026-10-05). Apps decide what to keep, which is why caching strategy libraries exist.
Caching strategies. Cache First, Network First, Stale-While-Revalidate, Network Only and Cache Only describe who answers first. They are the vocabulary Workbox uses (source: https://developer.chrome.com/docs/workbox/modules/workbox-strategies, accessed 2026-10-05).
IndexedDB. The browser’s built-in transactional object database. Powerful and verbose; most libraries in this survey exist to make it pleasant.
OPFS. The Origin Private File System: a private, per-origin file system. It lets WebAssembly (WASM) programs such as SQLite keep a real database file in the browser.
Quota. How much one origin may store. On current Chromium and Safari it is a large fraction of disk; Firefox caps best-effort data at the smaller of 10% of disk or 10 GiB (source: MDN, Storage quotas and eviction criteria, accessed 2026-10-05).
Eviction. Deletion by the browser. Default storage is “best-effort”: under storage pressure
the least recently used origin goes first. Persistent storage, requested with
navigator.storage.persist(), is evicted only by the user. Chrome decides silently from
engagement and install signals, Firefox asks the user, and Safari decides silently.
Safari’s 7-day rule. Safari deletes script-written storage (IndexedDB, Cache Storage, service worker registrations) for sites that saw no user interaction in 7 days of browser use, unless the site is installed as a Home Screen web app (source: https://webkit.org/tracking-prevention/, accessed 2026-10-05). It is the reason an offline app can work for a week and then lose its data on an iPhone.
Offline-first and local-first. Offline-first treats the network as optional and the server as the source of truth. Local-first treats the device copy as primary and the server as a sync peer. Both lean on the same storage; local-first adds conflict resolution (CRDTs), covered by no survey in this corpus yet.
Layers#
| Layer | Question it answers | Examples |
|---|---|---|
| App shell | Does the page load with no network? | service worker plus Workbox |
| Records | Where do the user’s structured data live? | idb, Dexie, RxDB, PouchDB, SQLite WASM |
| Files | Where do large binaries live? | Cache Storage, OPFS |
| Durability | Will the browser keep it? | persist(), install, export |
| Sync | How do device and server converge? | PouchDB, RxDB replication, Dexie Cloud, custom |
Why it matters#
Mobile networks fail often enough that load-time and offline behavior shape user trust. The mistake teams make is treating the local database as a vault. Browsers treat it as a cache that the user’s disk space and Safari’s rules can reclaim.
What the pieces look like#
A Workbox service worker choosing a strategy per kind of request:
import { precacheAndRoute } from "workbox-precaching";
import { registerRoute } from "workbox-routing";
import { CacheFirst, NetworkFirst } from "workbox-strategies";
precacheAndRoute(self.__WB_MANIFEST); // the app shell, from the build
registerRoute(({ request }) => request.destination === "image",
new CacheFirst({ cacheName: "images" }));
registerRoute(({ request }) => request.mode === "navigate",
new NetworkFirst({ cacheName: "pages" }));A Dexie table with an index, and a persistence request after the first save:
import Dexie from "dexie";
const db = new Dexie("app");
db.version(1).stores({ records: "++id, status, updatedAt" });
await db.records.add({ status: "unsent", updatedAt: Date.now() });
if (navigator.storage?.persist) await navigator.storage.persist(); // may be refused
const { usage, quota } = await navigator.storage.estimate();Common mistakes#
- Treating IndexedDB as permanent storage. Without persistence it is a cache the browser may reclaim; the default mode is best-effort.
- Testing offline behavior only in a desktop Chromium tab. Safari tabs and installed iOS apps follow different retention rules.
- Caching authenticated or personalized responses with Cache First, so one user’s page is served to the next visitor of a shared device.
- Letting a runtime cache grow without an expiration policy until the device runs out of space.
- Depending on Background Sync for the retry of queued writes.
Where to read next#
- 1.119.2 Push Notification Libraries (service workers deliver push).
- 1.187 Embedded Databases (SQLite, DuckDB outside the browser).
- 1.111 State Management Libraries; 1.110 Frontend Frameworks.
- Sources cited above; Workbox documentation at developer.chrome.com/docs/workbox; Dexie at dexie.org; SQLite WASM persistence at sqlite.org/wasm/doc/trunk/persistence.md.
S1: Rapid Discovery
S1 Rapid Discovery: Approach#
What this category is#
Browser offline storage is the set of platform APIs and JavaScript libraries that let a web app keep working when the network is slow, absent or lying. It splits into two jobs that are easy to conflate:
- Keeping the app itself available. Caching HTML, scripts, styles and media so a page loads with no network. The platform pieces are service workers and Cache Storage; Workbox is the dominant library.
- Keeping the user’s data available. Storing records the app reads and writes while offline. The platform pieces are IndexedDB, the Origin Private File System (OPFS) and web storage; Dexie, idb, idb-keyval, localForage, RxDB, PouchDB and SQLite compiled to WebAssembly sit on top.
A third concern cuts across both: how long the browser lets the data live. Quotas,
eviction under storage pressure, Safari’s 7-day rule for script-written data and
navigator.storage.persist() decide whether “offline” survives a month.
Inclusion test#
A project is in scope if its main job is to cache app resources or store structured or binary data inside the browser, for use without a network.
Out of scope, cross-referenced instead
- Sync engines and CRDT libraries (Yjs, Automerge, Zero, ElectricSQL sync) as such. They appear only where a storage library bundles replication. The corpus has no dedicated local-first or CRDT survey yet.
- Push notifications and service-worker messaging: see 1.119.2 Push Notification Libraries.
- Embedded databases outside the browser (SQLite, DuckDB, LMDB): see 1.187 Embedded Databases.
- Frontend state management (Redux, Zustand, signals): see 1.111; in-memory state is not offline storage.
- Framework PWA scaffolding beyond the service-worker plugin layer: see 1.110 Frontend Frameworks.
- Native mobile storage: see 1.119 Mobile Frameworks and 1.069 Mobile Secure Storage.
Evaluation dimensions#
- Layer: platform primitive, thin wrapper, or database with query and sync.
- Storage backend used: IndexedDB, Cache Storage, OPFS, localStorage, memory.
- Bundle cost: bytes shipped to the client (measured, see S2).
- Reactivity and queries: indexes, live queries, schema migrations.
- Sync story: none, bring your own, or built-in replication.
- License and money shape: open source, or paid plugins and hosted services.
- Durability signal: release cadence, merged PRs against open PRs (stall test).
- Browser reach: what works on Safari and iOS home-screen apps, not only Chromium.
Data libraries over IndexedDB, OPFS and web storage#
Facts below are from the npm registry and GitHub, read 2026-10-05 (see
harness/1-118-browser-offline-storage/results_registry.json).
| Library | Layer | Version (released) | License | Weekly downloads |
|---|---|---|---|---|
| idb | Promise wrapper over IndexedDB | 8.0.3 (2025-05-07) | ISC | 30,741,527 |
| idb-keyval | Key-value over IndexedDB | 6.3.0 (2026-07-08) | Apache-2.0 | 11,437,505 |
| localForage | Async localStorage-style API over IndexedDB, WebSQL, localStorage | 1.10.0 (2021-08-18) | Apache-2.0 | 10,235,615 |
| Dexie | Query layer with schema, indexes, live queries over IndexedDB | 4.4.6 (2026-09-10) | Apache-2.0 | 2,928,925 |
| PouchDB | Document database with CouchDB replication | 9.0.0 (2024-06-21) | Apache-2.0 | 93,954 |
| RxDB | Reactive document database, pluggable storages, replication | 17.5.0 (2026-08-20) | Apache-2.0 (core) | 118,427 |
| @sqlite.org/sqlite-wasm | Official SQLite build for the browser | 3.53.4-build2 (2026-10-02) | Apache-2.0 (npm) | 1,057,515 |
| wa-sqlite | Community SQLite WASM with several VFSes | npm 1.0.0 (2024-01-05); repo active | MIT (repo) | not collected |
| PGlite | Postgres compiled to WASM | 0.5.8 (2026-08-26) | Apache-2.0 | 25,733,315 |
Download counts measure installs, including transitive ones. idb’s count is likely inflated by transitive dependents such as Workbox, which lists idb among its dependencies (unverified for others).
idb and idb-keyval#
Both are by Jake Archibald. idb is a thin typed wrapper that turns IndexedDB requests into promises and keeps IndexedDB’s object-store and index model. idb-keyval is a get/set store; its minified entry point is 591 bytes (measured 2026-10-05; esbuild 0.25.0; see S2). Neither adds a query language.
localForage#
Mirrors the localStorage API (getItem, setItem) with asynchronous storage and
automatic fallback between drivers. Last release 2021-08-18, last commit 2024-07-30. Its WebSQL
fallback targets a deprecated browser feature. See S4 for the stall reading.
Dexie#
IndexedDB with a declarative schema, versioned migrations, compound indexes, hooks and
liveQuery(), which re-runs a query when affected records change, including in other tabs
(source: https://dexie.org/, accessed 2026-10-05). The library is free open source. Its
paid product is Dexie Cloud, a hosted sync service (free tier of 3 production users and
100 MB; Pro at EUR 0.12 per user per month; on-premises EUR 3,495 or EUR 7,995 one-time;
source: https://dexie.org/pricing, accessed 2026-10-05).
PouchDB#
A JavaScript implementation of the CouchDB replication protocol: documents with revision
trees, conflict detection, and one-line sync to CouchDB or compatible servers. 9.0.0
(2024-06-21) changed .find() to return 25 results by default and dropped IE-era
polyfills (source: https://pouchdb.com/2024/05/24/pouchdb-9.0.0.html, accessed 2026-10-05).
An Apache project; an Apache incubator page still describes it as incubating (source:
https://pouchdb.incubator.apache.org/, accessed 2026-10-05).
RxDB#
A NoSQL database where queries are observables and every collection can replicate. The
core is Apache-2.0 on npm. The storage layer is where money enters: the free adapters are
Memory, LocalStorage, Dexie.js, MongoDB, DenoKV and FoundationDB; the IndexedDB, OPFS and
SQLite storages, plus Worker, SharedWorker and Sharding wrappers, require “premium” access
(source: https://rxdb.info/rx-storage.html, accessed 2026-10-05). The installed 17.5.0 package
contains the free storages only (checked in node_modules/rxdb/dist/esm/plugins/, 2026-10-05).
SQLite on WASM#
The official @sqlite.org/sqlite-wasm gives full SQL in the browser; with an OPFS VFS the
database persists as a file. Costs: a roughly 0.87 MB WebAssembly binary (sqlite3.wasm is
868,907 bytes; measured 2026-10-05, v3.53.4-build2), worker-only persistence and a
connection-sharing limit between tabs. wa-sqlite offers additional VFSes (including
IndexedDB-backed ones) and is a common engine choice for local-first stacks (unverified). PGlite is
listed because it is the same idea for Postgres; it persists to IndexedDB or OPFS.
Its 25.7M weekly downloads are driven by dependency chains rather than direct browser use (unverified).
Platform primitives#
Every library in this survey is a layer over one of five browser mechanisms.
| Primitive | Holds | Where it runs | Notes |
|---|---|---|---|
Cache Storage (caches) | Request/Response pairs | Window, worker, service worker | No automatic expiry; ignores HTTP cache headers; strips Set-Cookie; Vary-aware matching (source: https://developer.mozilla.org/en-US/docs/Web/API/Cache, accessed 2026-10-05) |
| IndexedDB | Structured-clone objects, blobs, indexed by key | Window, worker | The only structured store with indexes and transactions on every browser; verbose callback API |
| OPFS (Origin Private File System) | Files and directories, private to the origin | Window (async API); workers (synchronous access handles) | Baseline widely available since March 2023; createSyncAccessHandle() is worker-only (source: https://developer.mozilla.org/en-US/docs/Web/API/File_System_API/Origin_private_file_system, accessed 2026-10-05) |
| localStorage / sessionStorage | Strings | Window only | 5 MiB each per origin, 10 MiB combined on all browsers (source: MDN storage quotas page, accessed 2026-10-05); synchronous, so it blocks the main thread |
| Service worker | Not storage: a programmable proxy that decides what serves a request | Worker | The reason offline page loads are possible; registration itself is script-writable state and can be evicted |
Cache Storage vs IndexedDB#
Cache Storage answers “what bytes did this URL return.” IndexedDB answers “what records does
the app hold.” A web app that caches an API response in Cache Storage gets back the same
JSON for the same request and nothing else; one that needs to filter, sort, edit and queue
writes needs IndexedDB or a database over OPFS. Large binary assets (video, map tiles, model
files) fit either: Cache Storage when they are fetched by URL and served to <video> or
fetch, OPFS when the app manipulates them as files.
OPFS and SQLite on WebAssembly#
OPFS gives a browser app a real file system, which lets SQLite compiled to WebAssembly keep a database file on disk instead of mapping a relational store onto IndexedDB. The official SQLite WASM build documents three persistence routes (source: https://sqlite.org/wasm/doc/trunk/persistence.md, accessed 2026-10-05):
kvvfsover localStorage/sessionStorage: main thread only, about 5 MB, one database per storage type.opfsVFS: worker only; needs the cross-origin isolation headers (COOP/COEP) soSharedArrayBufferis available; one open handle per database at a time.opfs-sahpoolVFS: worker only; no COOP/COEP requirement; the fastest of the OPFS options; no simultaneous connections to one database across threads.
The headers requirement is a deployment constraint: cross-origin isolation blocks some
third-party embeds, which is why opfs-sahpool is the common choice for general sites.
Quota, eviction and persistence#
Covered per browser in S2 (quotas-and-eviction.md). Short version: Chromium and Safari
now allow a large share of disk per origin, but “best-effort” data can be deleted under
storage pressure, and Safari additionally deletes script-written data after 7 days without
user interaction unless the site is an installed Home Screen web app.
S1 Recommendation: pick by layer first#
Offline web apps need up to three independent choices. Mixing them up is the usual source of a bad stack.
| Question | Options | Default |
|---|---|---|
| How does the app shell load offline? | Workbox (via vite-plugin-pwa or direct), hand-written service worker | Workbox |
| Where do records live? | idb-keyval, idb, Dexie, localForage, PouchDB, RxDB, SQLite WASM | Smallest layer that covers the query needs |
| How are large files kept? | Cache Storage, OPFS | Cache Storage when fetched by URL; OPFS when edited as files |
Decision map#
- Key-value only (settings, drafts, a token): idb-keyval. 591 bytes minified (measured 2026-10-05, esbuild 0.25.0).
- Records with indexes, filters and a reactive UI: Dexie. About 32.7 kB gzip (measured 2026-10-05, esbuild 0.25.0, minimal entry).
- Replicate to CouchDB or a compatible server: PouchDB, or RxDB with its CouchDB replication.
- Relational queries, joins, existing SQL: SQLite WASM on OPFS (
opfs-sahpool). - Offline page loads: Workbox; add
workbox-expirationto bound cache growth. - Anything irreplaceable: call
navigator.storage.persist(), and keep a server copy. Browsers treat local data as a cache by default.
Things this category gets wrong most often#
- Treating IndexedDB as permanent. It is best-effort storage unless persistence is granted.
- Testing only on Chromium. Safari deletes script-written data after 7 days without user interaction on a site opened in the browser, and exempts installed Home Screen web apps.
- Assuming Background Sync exists everywhere. It does not (MDN: limited availability).
- Choosing a library for its sync feature, then discovering the sync server is the product.
Service worker caching: Workbox and the plugin layer#
Workbox#
Workbox is Google Chrome’s service-worker toolkit: modules for precaching a build’s
assets, routing requests, applying caching strategies, expiring entries, queueing failed
writes (background sync) and serving range requests. License MIT; version 7.4.1, released
2026-05-04 (source: npm registry, accessed 2026-10-05). Weekly npm downloads for
workbox-build: 10,953,832 (week ending 2026-10-03; source: https://api.npmjs.org/downloads, accessed 2026-10-05).
Five built-in strategies (source: https://developer.chrome.com/docs/workbox/modules/workbox-strategies, accessed 2026-10-05):
| Strategy | Behavior | Fits |
|---|---|---|
| Cache First | Serve from cache; hit the network only on a miss | Versioned or immutable assets |
| Network First | Try the network; fall back to cache on failure | Content that changes often |
| Stale-While-Revalidate | Serve cache immediately, refresh in the background | Avatars, non-critical API data |
| Network Only | Always network | Anything that must not be cached |
| Cache Only | Cache only | Precached assets managed elsewhere |
Caveat from the same page: by default NetworkFirst and StaleWhileRevalidate also cache opaque (no-CORS cross-origin) responses.
Modules the survey checked on npm: workbox-precaching, workbox-routing,
workbox-strategies, workbox-expiration, workbox-range-requests,
workbox-background-sync, workbox-window, workbox-build, all at 7.4.1 (source: npm registry, accessed 2026-10-05).
Cadence. 7.1.0 on 2024-04-23, 7.3.0 on 2024-10-29, 7.4.0 on 2025-11-19, 7.4.1 on 2026-05-04 (source: npm registry, accessed 2026-10-05): a few releases a year, with a long gap before each.
Build-tool plugins#
Most projects reach Workbox through a plugin rather than writing a service worker by hand.
- vite-plugin-pwa 2.0.0, released 2026-10-03; MIT; 5,939,676 weekly downloads (source: npm registry, accessed 2026-10-05). Generates a manifest and a Workbox-based service worker for Vite and frameworks built on it.
- @vite-pwa/sveltekit 1.1.0 (2025-11-27) and similar framework adapters.
- next-pwa 5.6.0, last published 2022-08-23 (source: npm registry, accessed 2026-10-05): no release in over four years.
- sw-precache: deprecated on npm in favor of Workbox.
What a service worker cannot do#
- Background Sync (retry queued writes when connectivity returns) is “Limited
availability” on MDN: it does not work in some of the most widely used browsers (source:
https://developer.mozilla.org/en-US/docs/Web/API/Background_Synchronization_API, accessed 2026-10-05).
Workbox’s
workbox-background-syncfalls back to replaying the queue on the next service-worker start, which is not a background trigger. An offline write queue needs an app-level retry as well. - It cannot keep its own registration or caches from being evicted; see S2.
S2: Comprehensive
S2 Comprehensive: Approach#
Four bodies of evidence, each with its own marker rung:
| Evidence | File | Rung |
|---|---|---|
| Browser quota and eviction rules | quotas-and-eviction.md | cited (MDN, WebKit, web.dev) |
| Bytes shipped per library | bundle-size.md | measured-local |
| Maintenance and durability | durability-signals.md | cited (npm, GitHub API), computed locally |
| Capability differences | feature-comparison.md | cited (docs, package contents) |
Measurement code lives in harness/1-118-browser-offline-storage/: bundle_size.mjs
(esbuild), registry_facts.py and stall_test.py (npm and GitHub APIs). Results are
committed as JSON beside the scripts. Environment for all runs: Node v20.20.0, esbuild
0.25.0, Linux 6.6 on WSL2, 2026-10-05.
Not measured: runtime read/write throughput. A fair IndexedDB-versus-OPFS benchmark needs real
browsers per engine (Chromium, Firefox, WebKit) and a cold-start protocol; that is
deferred in measurement-plan.md.
Bundle size per library#
Workload#
For each library, the smallest realistic import that can open a store and write and read a
value, bundled with esbuild and compressed. No tree-shaking tricks beyond what esbuild does by
default; no code is executed. Script: harness/1-118-browser-offline-storage/bundle_size.mjs;
raw output: results_bundle.json.
(measured 2026-10-05; Node v20.20.0; esbuild 0.25.0; --bundle --minify --format=esm --platform=browser --target=es2022; gzip level 9, brotli quality 11; library versions as pinned in the harness package.json)
| Entry point | Minified bytes | gzip | brotli |
|---|---|---|---|
idb-keyval 6.3.0 (get, set) | 591 | 352 | 306 |
idb 8.0.3 (openDB) | 3,335 | 1,367 | 1,241 |
workbox-window 7.4.1 (Workbox) | 5,673 | 2,333 | 2,065 |
| Workbox service worker 7.4.1: precaching + routing + 3 strategies | 17,383 | 5,764 | 5,230 |
Same plus workbox-expiration | 24,118 | 7,893 | 7,183 |
| localForage 1.10.0 | 30,336 | 9,794 | 8,759 |
| Dexie 4.4.6 | 100,152 | 32,695 | 29,204 |
PouchDB 9.0.0 (pouchdb-browser, with the events shim) | 126,847 | 43,095 | 38,032 |
| RxDB 17.5.0 core + LocalStorage storage (+ RxJS 7.8.2) | 141,441 | 45,435 | 40,176 |
| RxDB 17.5.0 core + Dexie storage (+ RxJS, Dexie) | 252,066 | 81,797 | 72,033 |
| @sqlite.org/sqlite-wasm 3.53.4-build2, JS glue only | 213,995 | 65,473 | 57,544 |
| sqlite3.wasm, the WebAssembly binary on disk (uncompressed) | 868,907 | not measured | not measured |
Reading the table#
- The spread from idb-keyval (352 bytes gzipped) to RxDB with Dexie storage (81,797 bytes gzipped) covers the same “store a value” task (measured; the tasks differ in capability, so this is a cost of features, not a ranking).
- Dexie, the most widely used full query layer, costs about 33 kB gzipped.
- RxDB’s core with its smallest free browser storage costs about 45 kB gzipped; the Dexie storage adds Dexie itself. The premium IndexedDB and OPFS storages were not installable and are not in the table.
- SQLite WASM is two downloads: the JS glue plus the binary. The 869 kB binary ships separately ; its compressed size was not measured.
- PouchDB’s number includes the Node
eventsshim, which bundlers other than a Node-aware esbuild config must also supply. Without it the build failed onevents.
Limits#
Bytes shipped is not parse or startup time, and none of these libraries was executed. Libraries with plugin architectures (RxDB, Dexie addons) grow with the features enabled. Workbox’s service worker code runs in the worker, not on the page’s critical path, and its precache manifest adds bytes proportional to the app.
Durability signals#
Method: the stall test from ADDING-RESEARCH.md. Open PRs, PRs merged since 2026-03-01, and
commits since that date, from the GitHub API; the cell reading comes from the four-cell
table (patches arriving or not, merged or not). Script: harness/1-118-browser-offline-storage/stall_test.py.
(measured 2026-10-05; GitHub REST API and search API; window 2026-03-01 to 2026-10-05; raw output results_stall.json)
| Project | Open PRs | Merged since 2026-03-01 | Commits since | Latest npm release |
|---|---|---|---|---|
| Workbox | 19 | 38 | 87 | 7.4.1, 2026-05-04 |
| Dexie | 20 | 46 | 129 | 4.4.6, 2026-09-10 |
| RxDB | 11 | 1,108 | 1,267 | 17.5.0, 2026-08-20 |
| PouchDB | 59 | 46 | 96 | 9.0.0, 2024-06-21 |
| @sqlite.org/sqlite-wasm | 1 | 19 | 26 | 3.53.4-build2, 2026-10-02 |
| wa-sqlite | 8 | 38 | 151 | npm 1.0.0, 2024-01-05 |
| idb-keyval | 6 | 4 | 10 | 6.3.0, 2026-07-08 |
| PGlite | 47 | 102 | 99 | 0.5.8, 2026-08-26 |
| vite-plugin-pwa | 23 | 12 | 15 | 2.0.0, 2026-10-03 |
| idb | 11 | 0 | 0 | 8.0.3, 2025-05-07 |
| localForage | 35 | 0 | 0 | 1.10.0, 2021-08-18 |
Readings#
- Healthy (patches arriving and merging): Workbox, Dexie, RxDB, SQLite WASM, wa-sqlite,
PGlite, vite-plugin-pwa, idb-keyval. Many of RxDB’s and some of Workbox’s merges are
automated dependency bumps (the recent-merge lists in
results_registry.jsonshow renovate and dependabot authors), so merged counts overstate human review there. Workbox’s last release was 2026-05-04, five months before the survey date. - Stalled: localForage. 35 open PRs, zero merged and zero commits since 2026-03-01; last commit 2024-07-30; last release 2021-08-18. It still receives 10.2M weekly downloads (npm, week ending 2026-10-03). The library is Apache-2.0 with open patches already written; a durability signal, not a quality verdict.
- Stalled or finished: idb. 11 open PRs, zero merged, zero commits since 2026-03-01; last commit and release 2025-05-07. A small wrapper over a frozen API can be finished; the unanswered inbound patches argue for caution rather than alarm.
- Slow release, active repo: PouchDB. The repo merged 46 PRs in the window, but the last npm
release is 9.0.0 from 2024-06-21 (npm shows a later
modifieddate of 2025-10-13 on the package, not a new version). A reader who installs from npm gets a two-year-old build. - Wrapper versions diverge from repos. wa-sqlite’s repo is the most active of the SQLite options (151 commits) while its npm package is 1.0.0 from January 2024; consumers pin git or a fork (unverified how widely).
Feature comparison#
Sources: each project’s documentation and package contents, read 2026-10-05; see S1 files for URLs.
Data libraries#
| idb-keyval | idb | localForage | Dexie | PouchDB | RxDB | SQLite WASM | |
|---|---|---|---|---|---|---|---|
| Model | key-value | object stores | key-value | tables with indexes | JSON documents | JSON documents with schema | relational SQL |
| Queries | none | index and cursor | none | indexed queries, where chains | Mango find, map/reduce | Mango-style, observable | SQL |
| Schema migrations | n/a | upgrade callback | n/a | declarative versions | n/a | schema versions plus migration plugin | SQL |
| Live / reactive queries | no | no | no | liveQuery() | changes feed | observable queries | none built in |
| Cross-tab awareness | no | no | no | yes (liveQuery) | no | leader election plugin | one handle per DB (opfs VFS) |
| Built-in sync | no | no | no | Dexie Cloud (paid, hosted) | CouchDB protocol | replication plugins (CouchDB, GraphQL, WebSocket, Supabase, Firestore and others) | none |
| Storage backend | IndexedDB | IndexedDB | IndexedDB, WebSQL, localStorage | IndexedDB | IndexedDB (and others via adapters) | pluggable | OPFS, kvvfs |
| Money shape | free | free | free | free; Dexie Cloud paid | free | free core; premium storages | free |
RxDB replication plugins are the directory names in the 17.5.0 package (replication-couchdb,
replication-graphql, replication-websocket, replication-webrtc, replication-supabase,
replication-firestore, replication-mongodb, replication-nats, replication-appwrite,
replication-google-drive, replication-microsoft-onedrive; checked 2026-10-05).
Offline page loading#
| Workbox | Hand-written service worker | |
|---|---|---|
| Precache a build’s asset list | workbox-precaching with a build-time manifest | write and version it yourself |
| Runtime strategies | five built in | write each |
| Entry expiration and size caps | workbox-expiration | write it |
| Range requests for media | workbox-range-requests | write it |
| Failed-write queue | workbox-background-sync | write it |
| Update prompt to the page | workbox-window | write it |
Capability gaps worth knowing#
- Binary files as files. Only OPFS offers file handles; Cache Storage stores responses; IndexedDB stores blobs by key.
- SQL. Only SQLite WASM and PGlite. Dexie and PouchDB have no joins.
- Multi-tab writers. IndexedDB handles concurrent transactions across tabs natively. SQLite
on OPFS limits connections per database (
opfs: one handle at a time;opfs-sahpool: one thread), so multi-tab apps either use theopfs-wlVFS, which arbitrates access with Web Locks (sqlite.org persistence docs), or route writes through one coordinating worker.
Measurement plan#
| Level | What it settles | Cost | Rung reachable | Coverage | Status |
|---|---|---|---|---|---|
| L0 Registry facts (npm, GitHub) | Versions, licenses, cadence, downloads | minutes | cited | all libraries | done |
| L1 Bundle size with esbuild | Bytes a user downloads per library | minutes, one container | measured-local | 10 of 11 libraries (not PGlite; its WASM and extensions are a different class) | done |
| L2 Stall test via GitHub API | Which projects are still merging patches | minutes | measured-local (API read) | all repos | done |
| L3 Quota and eviction rules | Per-browser limits and Safari’s 7-day rule | reading | cited; vendor docs cannot go higher than cited | 3 engines | done |
| L4 Real-browser throughput (write 10k records, read by index) | Whether wrapper overhead matters against raw IndexedDB | hours; needs Playwright with Chromium, Firefox and WebKit | measured-browser | idb, Dexie, localForage, PouchDB, RxDB | deferred |
| L5 Eviction behavior on a real iOS device | Whether the 7-day deletion happens as documented | days of wall clock; needs a physical iPhone | measured-device | Safari only | deferred |
Cut line: L1 and L2 run in one container with no external service, so they ran. L4 needs three browser engines and a cold-start protocol; L5 needs hardware and a week. Both are filed as follow-ups. No claim in this survey depends on L4 or L5.
L4 is the likeliest next step if a reader’s decision turns on speed rather than size. Wrapper libraries all sit on the same IndexedDB engine, so differences measured on one browser would not transfer to another without running each (WebKit’s IndexedDB is a separate implementation from Chromium’s).
Quotas, eviction and persistence by browser#
Quota per origin#
Source for the table: MDN, Storage quotas and eviction criteria (https://developer.mozilla.org/en-US/docs/Web/API/Storage_API/Storage_quotas_and_eviction_criteria, accessed 2026-10-05) and WebKit, Updates to Storage Policy (https://webkit.org/blog/14403/updates-to-storage-policy/, accessed 2026-10-05).
| Browser | Best-effort quota | Persistent quota |
|---|---|---|
| Chrome, Edge (Chromium) | Up to 60% of total disk per origin | Same, 60% |
| Firefox | The smaller of 10% of disk or 10 GiB (the group limit for one site) | Up to 50% of disk, capped at 8 TiB, outside the group limit |
| Safari 17+ / macOS 14+ (browser app) | Around 60% of disk per origin; 80% across all origins | Persist grants protection from eviction; quota unchanged |
| Safari 17+, other WebKit apps (embedded web views) | Around 15% of disk per origin; 20% across origins | n/a |
| Safari Home Screen web app | Same quota as the browser app (around 60%) | Persist is granted by heuristics, e.g. Home Screen app |
| Safari before 17 | An initial 1 GiB quota per origin | n/a |
Cross-origin frames in Safari get roughly a tenth of their parent’s quota. Web Storage (localStorage plus sessionStorage) stays at 10 MiB combined everywhere.
Older figures still in circulation#
web.dev’s “Storage for the web” (last updated 2024-09-23) states Firefox “may use up to 2GB”
per eTLD+1 group and Safari “approximately 1GB” with permission prompts in 200 MB steps
(source: https://web.dev/articles/storage-for-the-web, accessed 2026-10-05). MDN’s current page
gives Firefox 10 GiB and Safari 17 around 60% of disk. The two sources disagree for Firefox and
Safari; this survey uses MDN and WebKit’s own post, which are newer and primary for Safari.
Check navigator.storage.estimate() on target devices rather than hard-coding either.
Eviction#
- Best-effort mode (default). Data survives while the origin is under quota, the device has space and the user does not clear it. Under storage pressure, browsers delete whole origins in least-recently-used order and skip origins with persistence granted (MDN, above).
- Persistent mode. Evicted only when the user chooses, via browser settings (MDN).
- Safari’s 7-day rule. WebKit’s Intelligent Tracking Prevention “deletes all cookies created in JavaScript and all other script-writeable storage after 7 days of no user interaction with the website.” Affected storage: IndexedDB, LocalStorage, media keys, SessionStorage, service worker registrations and cache (source: https://webkit.org/tracking-prevention/, accessed 2026-10-05). Server-set cookies are exempt. “The first-party domain of home screen web applications is exempt.” MDN adds that the clock counts days of browser use, and that the rule applies when cross-site tracking prevention is on.
- WebKit’s LRU. Safari 17 evicts by least recent user interaction or last storage operation, and protects origins that have active pages or persistent mode.
navigator.storage.persist()#
Baseline widely available since December 2021 (MDN). The browser may refuse.
| Browser | How the request is decided |
|---|---|
| Chrome, Edge | Silent decision from heuristics: site engagement, installed or bookmarked, notification permission granted (source: https://web.dev/articles/persistent-storage, last updated 2020-05-12, accessed 2026-10-05); denied requests can be retried |
| Firefox | A permission prompt to the user |
| Safari | Silent decision; WebKit cites heuristics such as being opened as a Home Screen web app |
navigator.storage.estimate() reports usage and quota; WebKit says the quota it returns is the
origin quota. In private browsing, quotas shrink or persistence is absent: Chrome incognito is
about 5% of disk (source: web.dev, above) and the SQLite WASM docs warn of “lower quotas or a complete lack of persistence”
in incognito or guest modes.
What this means for offline apps#
- Ask for persistence at a meaningful moment (after the first save, or on install), not at page load. In Firefox it is a visible prompt.
- On iOS and iPadOS, the install-to-Home-Screen path is what removes the 7-day deletion; a plain Safari tab is subject to it.
- Do not store the only copy of user data client-side unless persistence is granted and the user has an export path.
- Treat the Cache Storage and service worker registration as rebuildable. Treat IndexedDB and OPFS contents as rebuildable too unless persisted.
S2 Recommendation#
- Browser rules differ more than libraries do. Per-origin quota is a share of disk on Chromium (60%), Safari 17+ (around 60%) and Firefox (smaller of 10% of disk or 10 GiB in best-effort mode). Eviction is where they diverge: Safari’s 7-day rule deletes script-written data for tabs, and installed Home Screen apps are exempt.
- Older references are wrong now. web.dev’s page still states Firefox 2 GB and Safari
about 1 GB; MDN and WebKit’s own post give the newer figures. Measure with
navigator.storage.estimate(). - The cheapest layer that fits wins on bytes. idb-keyval is 352 bytes gzipped, Dexie about 32.7 kB, RxDB with Dexie storage about 81.8 kB, and SQLite WASM adds a 869 kB binary.
- RxDB’s free build has no IndexedDB or OPFS storage of its own. Those are premium; the free path goes through Dexie or localStorage.
- Two libraries show a stall. localForage (35 open PRs, none merged since 2026-03-01, last release 2021) and idb (11 open, none merged, last release 2025-05). PouchDB’s repository is active but its last npm release is June 2024.
S3: Need-Driven
S3 Need-Driven: Personas#
| Persona | What eliminates options | Usually lands on |
|---|---|---|
| Offline-first field data app (inspections, surveys, deliveries; days offline, records must not be lost) | Anything best-effort only; Safari tabs; Background Sync as the only retry path | Dexie or RxDB on IndexedDB, persist(), an installed PWA, an app-level outbox |
| PWA on flaky networks (mostly online, bad connections) | Cache-everything strategies that serve stale data forever; hand-rolled service workers | Workbox through a build plugin, Network First or Stale-While-Revalidate by route, idb-keyval for small state |
| Large-asset media cache (video, audio, map tiles, model files) | localStorage; storing blobs in key-value wrappers; ignoring range requests | Cache Storage with workbox-range-requests, or OPFS for files edited in place; persist() and estimate() |
| Local-first notes app (data lives on the device, sync optional) | Libraries with a hosted sync server as the only sync path; main-thread SQL | Dexie with liveQuery, or SQLite WASM on OPFS; RxDB if replication plugins fit |
Each persona file states the constraint, the eliminations it causes and a conditional recommendation.
S3 Recommendation#
| Persona | Pick | Guard rails |
|---|---|---|
| Offline-first field data app | Dexie plus an outbox table; RxDB or PouchDB when the backend matches their replication | persist(), installed app on iOS, visible unsynced count, export path |
| PWA on flaky networks | Workbox via the build plugin; idb-keyval for small state | Per-route strategies, expiration on runtime caches, update prompt |
| Large-asset media cache | Cache Storage with range requests; OPFS for files edited in place; small catalog in IndexedDB | estimate() before download, persist() on “keep offline” |
| Local-first notes app | Dexie with liveQuery; SQLite WASM on OPFS for search and SQL | Persistence at first save, export, sync chosen separately |
Across all four: store nothing irreplaceable only in the browser, and test the Safari path (tab and installed) before trusting a design.
Persona: PWA on flaky networks#
Situation#
A content or commerce app used mostly online, on mobile networks that drop or crawl. Offline page loads and fast repeat visits matter; offline editing does not.
What it eliminates#
- Cache First for HTML and API data. Users see stale pages until the service worker updates.
- Hand-written service workers. Versioning, cleanup and update flows are where hand-rolled workers fail.
- Heavy databases. Nothing here needs queries beyond a few cached lists.
What remains#
- Workbox via vite-plugin-pwa (2.0.0, 2026-10-03) for Vite-based projects; a build-time precache manifest for the shell. A service worker with precaching, routing and three strategies is 5.8 kB gzipped; adding expiration 7.9 kB (measured 2026-10-05).
- Strategies by route: Cache First for hashed static assets, Stale-While-Revalidate for images and non-critical API data, Network First (with a timeout) for HTML and personalized data.
- workbox-expiration to cap entries so the cache does not grow without bound.
- idb-keyval (352 bytes gzipped) for a handful of settings and drafts.
- Update flow:
workbox-windowto tell the page a new version is waiting.
Recommendation#
Workbox through the build plugin, strategies chosen per route, expiration on every runtime cache, and an explicit “new version available” prompt. Skip a data library until a feature needs queries. next-pwa has had no release since 2022-08-23 (npm registry); prefer the maintained plugin for the framework in use. Opaque responses are cached by default by two strategies (Workbox docs, above); restrict them to CORS or status 200 where that matters.
Persona: large-asset media cache#
Situation#
An app that downloads video, audio, map tiles, documents or machine-learning model files and needs them to play or load without a network. Individual files run to tens or hundreds of megabytes.
What it eliminates#
- localStorage (10 MiB combined, strings only).
- Key-value wrappers (idb-keyval, localForage) as blob stores for very large files; they hold blobs, but add nothing and read whole values into memory (unverified).
- Assuming the quota is the limit. Under storage pressure, an unpersisted origin is a candidate for whole-origin eviction (MDN), and Safari tabs lose script-written data after 7 days idle.
- Ignoring range requests. Media elements ask for byte ranges; a cached full response needs a range-aware handler.
What remains#
- Cache Storage for assets fetched by URL:
workbox-range-requestsserves partial content from cached responses;workbox-expirationbounds entry counts and age. - OPFS when files are written, resumed or edited by the app (chunked downloads, working copies). Synchronous access handles are worker-only.
- IndexedDB for the catalog: which assets exist, their sizes and states, so the UI can show “downloaded”.
Recommendation#
Cache Storage plus a small Dexie or idb catalog for URL-addressed media; OPFS for anything the
app modifies. Call navigator.storage.estimate() before a large download and show the user the
remaining space; call persist() when the user chooses “keep offline”; present an installed-app
path on iOS. Quota limits are generous on current engines (Chromium about 60% of disk, Safari 17+
about 60%, Firefox up to 10 GiB best-effort; source: MDN quotas page, accessed 2026-10-05); the
practical limit is eviction and device free space.
Persona: local-first notes app#
Situation#
The device holds the primary copy. Notes are text with attachments, edited offline, searched locally and optionally synced between devices. The user expects the data to outlive a browser cache clear.
What it eliminates#
- Sync-first databases with a vendor server as the only path. A hosted sync service can be a good fit, but it is a vendor decision, not a storage decision (Dexie Cloud: free tier of 3 production users; Pro EUR 0.12 per user per month; source: https://dexie.org/pricing, accessed 2026-10-05).
- localForage. Stalled (see S2); a key-value API has no search.
- Main-thread SQL. SQLite WASM with OPFS persistence runs in a worker.
What remains#
- Dexie with
liveQuery: notes table with indexes on title, tags, modified time; cross-tab updates come with the library. - SQLite WASM (
opfs-sahpool, no COOP/COEP) when full-text search or relational queries matter; budget the 869 kB binary and a worker, and note the single-thread connection limit. - RxDB with a free Dexie or LocalStorage storage and the replication plugin that fits the server.
- Attachments: OPFS or IndexedDB blobs.
Merging edits from two devices is a separate problem (CRDTs or operational transforms). It is not solved by any storage library here; the corpus has no CRDT survey yet.
Recommendation#
Dexie for notes-sized data and reactive UI; SQLite WASM on OPFS when search and relational queries are central. Request persistence at first save, ship an export (Markdown or JSON download) because the browser is not a vault, and choose the sync path separately.
Persona: offline-first field data app#
Situation#
Crews collect forms, photos and signatures in places with no signal, sometimes for days. A lost record means a repeat site visit. Devices are a mix of Android phones and iPhones, often shared or locked down by an administrator.
What it eliminates#
- Best-effort storage with no safeguard. Data in a Safari tab is subject to the 7-day deletion
of script-written data (source: https://webkit.org/tracking-prevention/, accessed 2026-10-05).
Installed Home Screen web apps are exempt; ask crews to install, and detect
standalonedisplay mode. - Background Sync as the only retry mechanism. MDN lists it as limited availability.
- localStorage. 5 MiB per origin and synchronous.
- Key-value wrappers for form data. No indexes to find “unsent records”.
What remains#
- Dexie (about 32.7 kB gzipped, measured 2026-10-05): a
recordstable indexed by status, aphotostable of blobs,liveQueryfor an “unsent” counter. Dexie Cloud is one hosted sync option; a custom endpoint is the other. - RxDB, when replication to an existing backend (CouchDB, GraphQL, WebSocket and others) is wanted from a plugin. Its free storage path is Dexie or LocalStorage; its IndexedDB and OPFS storages are premium (source: https://rxdb.info/rx-storage.html, accessed 2026-10-05).
- PouchDB, when the server is CouchDB. Mind that the last npm release is June 2024.
- Photos: store in IndexedDB as blobs, or in OPFS and keep the path in the record.
Recommendation#
Dexie with an explicit outbox table (record id, payload, attempt count) drained on online
events and app start, navigator.storage.persist() called after the first saved record,
installed-app onboarding for iOS, and a visible “unsynced records” count so users never guess.
Add RxDB or PouchDB only if the backend already speaks their replication protocol.
Keep an export path (file download) for the worst case.
S4: Strategic
S4 Strategic: Viability#
Signals used, all dated 2026-10-05: release cadence (npm registry), the stall test (GitHub
API; see S2 durability-signals.md), license, and who pays for the project. Money answers
whether a project survives, not whether it is good: a hosted-service business behind a
library is a reason to expect maintenance and a reason to read the paid boundary carefully.
Platform risk and exit paths#
Rules that moved recently#
- Safari quotas. Before Safari 17 an origin started at 1 GiB; Safari 17 moved to a share of disk (around 60% for browser apps, around 15% for embedded web views). Source: MDN and WebKit, read 2026-10-05.
- Tracking prevention. The 7-day cap on script-written storage is a side effect of anti-tracking policy, so it can tighten or loosen with that policy. The Home Screen web-app exemption is the stable escape hatch today (WebKit, tracking-prevention page, 2026-10-05).
- Persistence prompts. Firefox asks the user; Chrome and Safari decide from history. A
persist()that returned true in testing can return false for a new visitor.
Features with limited reach#
- Background Sync: not Baseline (MDN, accessed 2026-10-05). Queue and retry in the app.
- SQLite on OPFS with the
opfsVFS needs cross-origin isolation headers;opfs-sahpooldoes not (sqlite.org persistence page, 2026-10-05). - Storage Buckets API: cross-browser status not verified (unverified).
Exit paths#
| From | To | Cost |
|---|---|---|
| localForage | idb-keyval or Dexie | Rewrite get/set calls; data stays in IndexedDB under localForage’s database and store names, so read it once and copy |
| Any IndexedDB library | OPFS plus SQLite | Export, load into SQL tables |
| Workbox | Hand-written service worker | Rewrite precache and strategies; the caches themselves are plain Cache Storage |
| PouchDB | RxDB with CouchDB replication | Replication keeps the server data; client schema is rewritten |
| Dexie Cloud | Another sync endpoint | Keep the Dexie tables, replace the sync layer |
The common safeguard is an export-to-file function and server-side copies of anything the user cannot recreate.
S4 Recommendation#
- Build on the platform, wrap lightly. Workbox and Dexie have the strongest combination of activity, license and low lock-in. idb-keyval is a safe small piece.
- Retire localForage in new work. It works today and receives no changes.
- Price RxDB’s premium storages before choosing it for performance; its free storages go through Dexie or localStorage.
- Pin wa-sqlite by git ref, and pin PouchDB’s version. Their npm cadences do not follow the repositories.
- Re-check browser rules each major Safari release. Re-run the stall test and bundle harness when a library publishes a major version.
Viability by project#
| Project | Durability signal | Money behind it | Lock-in | Reading |
|---|---|---|---|---|
| Platform APIs (IndexedDB, Cache Storage, OPFS) | Browser-standard; OPFS Baseline since March 2023, persist() since December 2021 (MDN) | None needed | None | The stable layer; rules (quota, eviction) change, interfaces do not |
| Workbox | Merging; 7.4.1 on 2026-05-04; one or two releases a year since 2024 | Google; ownership moved from the original Chrome developer-relations maintainers to Chrome’s Aurora team (Workbox README, “Maintenance update”) | Low: the output is a service worker you own | Safe default; release cadence is slow |
| Dexie | Merging; eight releases from 4.3.0 on 2025-12-20 to 4.4.6 (npm) | Dexie Cloud revenue (hosted sync, per user per month) | Low for the library; high only if Dexie Cloud sync is adopted | Strong |
| RxDB | 1,108 PRs merged since 2026-03-01 (many automated), six 17.x releases since 2026-03-30 | Premium storages and plugins | Medium: the performant storages are paid | Strong; price the premium storages before committing |
| PouchDB | Repo merging; npm release 2024-06-21 is the latest | Apache project, volunteer | Low (CouchDB protocol is open) | Usable; track the release gap |
| localForage | Stalled: 35 open PRs, none merged since 2026-03-01, last release 2021-08-18 | None visible | Low (API is trivial to replace) | Legacy; migrate new work to idb-keyval or Dexie |
| idb | Last release and commit 2025-05-07; 11 open PRs, none merged since March | Individual maintainer | Low | Likely finished; check before adopting for features |
| idb-keyval | Releases in 2026; few PRs | Individual maintainer | Low | Fine |
| SQLite WASM | Releases follow SQLite (3.53.4-build2 on 2026-10-02) | SQLite project | Low | Strongest engine; deployment constraints are the cost |
| wa-sqlite | Repo very active (151 commits since March); npm package stale | Individual maintainer | Medium | Pin to a git tag or fork |
| PGlite | Merging; 0.5.x | A sync-engine company | Medium | Pre-1.0 |
Platform risk#
- Safari’s rules. The 7-day rule and quota policy are WebKit decisions that have changed before (Safari 17 changed quotas; MDN records the earlier 1 GiB model). Design to the policy, verify per release, and avoid depending on a specific number.
- Chrome’s storage buckets. Chrome has a Storage Buckets API for per-bucket durability and quota; the survey did not verify its cross-browser status (unverified).
- Third-party storage partitioning affects embedded apps (iframes); the Safari quota for cross-origin frames is a tenth of the parent’s (WebKit, above).
Exit costs#
All data libraries here keep records in IndexedDB or OPFS, so leaving means a one-time export and re-import. Plan an export function from day one; it doubles as the user’s backup.