coderef

Storage bucketsLimited availability

The navigator.storageBuckets API allows you to organize locally stored data into groups called storage buckets. Each bucket can have different settings, allowing the browser to manage and delete buckets independently rather than applying the same treatment to all.

Not yet supported in all major browsers — check the table and provide a fallback.

Browser support

DesktopChrome
1–121Not supported
122+Supportedsince Feb 20, 2024
Current: 155
Edge
12–121Not supported
122+Supportedsince Feb 23, 2024
Current: 154
Firefox
✕Not supportedup to 157
Current: 157
Safari
✕Not supportedup to 27
Current: 27
MobileChrome Android
18–121Not supported
122+Supportedsince Feb 20, 2024
Current: 155
Firefox Android
✕Not supportedup to 157
Current: 157
Safari iOS
✕Not supportedup to 27
Current: 27

How to use

Not supported in Firefox, Safari, Firefox Android, Safari iOS. Use feature detection below and provide a fallback (or a polyfill) for those browsers.

Example

Full syntax and examples are on MDN — see the links below.

Feature detection

JS · check before using
if ("StorageBucket" in globalThis) {
  // StorageBucket is available
} else {
  // load a polyfill or use a fallback
}

Sub-features

Support for each part of the feature (16). The overall table above shows when the whole feature works.

Sub-featureChromeEdgeFirefoxSafariChrome AndroidFirefox AndroidSafari iOS
Navigator.storageBuckets122122✕✕122✕✕
StorageBucket122122✕✕122✕✕
StorageBucket.caches122122✕✕122✕✕
StorageBucket.estimate122122✕✕122✕✕
StorageBucket.expires122122✕✕122✕✕
StorageBucket.getDirectory122122✕✕122✕✕
StorageBucket.indexedDB122122✕✕122✕✕
StorageBucket.name122122✕✕122✕✕
StorageBucket.persist122122✕✕122✕✕
StorageBucket.persisted122122✕✕122✕✕
StorageBucket.setExpires122122✕✕122✕✕
StorageBucketManager122122✕✕122✕✕
StorageBucketManager.delete122122✕✕122✕✕
StorageBucketManager.keys122122✕✕122✕✕
StorageBucketManager.open122122✕✕122✕✕
WorkerNavigator.storageBuckets122122✕✕122✕✕