We're looking for a user researcher to understand the needs of developers and designers. Is this you or someone you know? Check out the post: https://mzl.la/2IGzdXS

StorageArea is an object representing a storage area.

Type

Values of this type are objects.

Methods

storage.StorageArea.get()
Retrieves one or more items from the storage area.
storage.StorageArea.getBytesInUse()
Gets the amount of storage space (in bytes) used one or more items being stored in the storage area.
storage.StorageArea.set()
Stores one or more items in the storage area. If an item already exists, its value will be updated.
storage.StorageArea.remove()
Removes one or more items from the storage area.
storage.StorageArea.clear()
Removes all items from the storage area.

Browser compatibility

ChromeEdgeFirefoxFirefox for AndroidOpera
Basic support Yes144548 Yes
clear Yes14454833
get Yes14454833
getBytesInUse Yes14 No No33
remove Yes14454833
set Yes141454833

1. storage is limited to 1MB per value.

Acknowledgements

This API is based on Chromium's chrome.storage API. This documentation is derived from storage.json in the Chromium code.

Microsoft Edge compatibility data is supplied by Microsoft Corporation and is included here under the Creative Commons Attribution 3.0 United States License.

Document Tags and Contributors

Contributors to this page: chrisdavidmills, wbamberg
Last updated by: chrisdavidmills,