StorageManager

Secure context
This feature is available only in secure contexts (HTTPS), in some or all supporting browsers.

This is an experimental technology
Check the Browser compatibility table carefully before using this in production.

The StorageManager interface of the the Storage API provides an interface for managing persistance permissions and estimating available storage. You can get a reference to this interface using either navigator.storage or WorkerNavigator.storage.

Methods

StorageManager.estimate() Secure context
Returns a StorageEstimate object containing usage and quota numbers for your origin.
StorageManager.persist() Secure context
Returns a Promise that resolves to true if the user agent is able to persist your site's storage.
StorageManager.persisted() Secure context
Returns a Promise that resolves to true if persistence has already been granted for your site's storage.
Specification Status Comment
Storage
The definition of 'StorageManger' in that specification.
Living Standard Initial definition.

Browser compatibility

We're converting our compatibility data into a machine-readable JSON format. This compatibility table still uses the old format, because we haven't yet converted the data it contains. Find out how you can help!

Feature Chrome Firefox (Gecko) Internet Explorer Microsoft Edge Opera Safari (WebKit)
Basic support 55 51 (51)[1]
57 (57)[3]
? ? 42 ?
estimate() 61 51 (51)[1]
57 (57)[3]
? ? 48 ?
persist() and persisted() 55 55 (55)[2]
57 (57)[3]
? ? 42 ?

 

Feature Android Webview Chrome for Android Firefox Mobile (Gecko) IE Mobile Opera Mobile Safari Mobile
Basic support 55 55 No support ? 42 ?
estimate() 61 61 No support ? 48 ?
persist() and persisted() 55 55 No support ? 42 ?

[1] Firefox 51 introduced NavigatorStorage, navigator.storage, and the StorageManager.estimate() method. These are enabled by default in nightly builds but disabled by default in all other builds. You can enable these features by setting the preference dom.storageManager.enabled to true.

[2] Firefox 55 introduced StorageManager.persist() and StorageManager.persisted() methods. Users can also manage persistent-storage data in Preferences "Privacy and  Security" -> "Site data".  These are enabled by default in nightly builds but disabled by default in all other builds. You can enable these features by setting the preference dom.storageManager.enabled and browser.storageManager.enabled to true.

[3] The Storage API is implemented and enabled by default in Firefox 57.

Document Tags and Contributors

Last updated by: chrisdavidmills,