v150 · Storage · IndexedDB
Durability Comparison
IndexedDB transactions accept an optional { durability: 'strict' | 'relaxed' } hint. 'strict' flushes to disk before the transaction's oncomplete fires — maximising crash safety. 'relaxed' may defer the flush for speed. Chrome 150's SQLite backend preserves both semantics; this page lets you benchmark them side by side.
durability: 'strict'
Transaction commits only after data is flushed to physical storage.
oncomplete fires after the fsync — data is durable even if the device loses power immediately after.
—
Run benchmark to measure
durability: 'relaxed'
The browser may complete the transaction before the OS flushes to disk.
oncomplete fires sooner — potentially faster, but a sudden power loss could lose the last transaction.
—
Run benchmark to measure
Click "Benchmark both modes" to compare durability performance on this device.
When to use 'strict'
Financial transactions, user-generated content, any data where loss is unacceptable. The SQLite backend's WAL still achieves good throughput with strict mode because WAL flushes are sequential — each commit appends to the WAL file rather than rewriting the whole database.When to use 'relaxed'
Telemetry, analytics, caches, ephemeral state — data where losing the last write on power failure is acceptable. On SSDs the performance difference is often small; on HDDs or systems under I/O pressure it can be significant.Default if omitted
idb.transaction(store, 'readwrite') — no hint — defaults to 'default', which the browser treats as 'relaxed' in most implementations. Explicitly passing 'strict' is the safe choice for anything important.
SQLite WAL advantage
Chrome 149's old LevelDB backend had unpredictable fsync behavior. SQLite WAL gives predictable, auditable commit points.strict mode maps cleanly to WAL's PRAGMA synchronous=FULL semantic — no guesswork about when data actually lands on disk.
see also
- Write Integrity Test — rapid sequential writes and verify
- Transaction Race Demo — parallel concurrent writers
- Concurrent Writers — 8-way concurrent write stress test
- ChromeStatus feature entry — IndexedDB SQLite backend rollout details
implementation reference
Need the exact API surface, compatibility boundaries, errors, lifecycle, and source links? Read the matching gendn reference ↗