IndexedDB relaxed durability transactions

Exposes an optional relaxedDurability parameter on IDBDatabase.transaction to control flushing to disk.

Allow developers to explicitly trade off durability for performance. Currently after writing an IndexedDB transaction, Firefox does not flush to disk but Chrome does. This flush increases the durability (in the ACID sense) in that it will be guaranteed to have been written all the way to disk rather than merely to an intermediate OS cache. However, this comes with a significant performance cost. On one test benchmark, not flushing caused a 10X+ performance improvement in adding new objects to a database: There is a future hope that we could make the relaxedDurability=true the default instead of opt-in.


Simple example: const txn = database.transaction([ "storeName" ], "readwrite", { durability: "relaxed" }); txn.durability; // "relaxed"


Editor's draft

Status in Chromium


Enabled by default (tracking bug) in:

  • Chrome for desktop release 83
  • Chrome for Android release 83
  • Android WebView release 83

Consensus & Standardization

After a feature ships in Chrome, the values listed here are not guaranteed to be up to date.


Intent to Prototype url

Intent to Prototype thread

Last updated on 2020-08-19