This feature is not Baseline because it does not work in some of the most widely-used browsers.
Experimental: This is an experimental technology
Check the Browser compatibility table carefully before using this in production.
The SharedStorage interface of the Shared Storage API represents the shared storage for a particular origin, defining methods to write data to the shared storage.
SharedStorage is the base class for:
WindowSharedStorage, accessed via Window.sharedStorage.WorkletSharedStorage, accessed via SharedStorageWorkletGlobalScope.sharedStorage.append() Experimental
Appends a string to the value of an existing key-value pair in the current origin's shared storage.
clear() Experimental
Clears the current origin's shared storage, removing all data from it.
delete() Experimental
Deletes an existing key-value pair from the current origin's shared storage.
set() Experimental
Stores a new key-value pair in the current origin's shared storage or updates an existing one.
window.sharedStorage
.set("ab-testing-group", "0")
.then(() => console.log("Value saved to shared storage"));
| Specification |
|---|
| Shared Storage API> # sharedstorage> |
| Desktop | Mobile | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Chrome | Edge | Firefox | Opera | Safari | Chrome Android | Firefox for Android | Opera Android | Safari on IOS | Samsung Internet | WebView Android | WebView on iOS | |
SharedStorage |
126 | 126 | No | 112 | No | 126 | No | 83 | No | 28.0 | 126 | No |
append |
126 | 126 | No | 112 | No | 126 | No | 83 | No | 28.0 | 126 | No |
batchUpdate |
134 | 134 | No | 119 | No | 134 | No | 88 | No | No | No | No |
clear |
126 | 126 | No | 112 | No | 126 | No | 83 | No | 28.0 | 126 | No |
createWorklet |
126 | 126 | No | 112 | No | 126 | No | 83 | No | 28.0 | No | No |
delete |
126 | 126 | No | 112 | No | 126 | No | 83 | No | 28.0 | 126 | No |
get |
126 | 126 | No | 112 | No | 126 | No | 83 | No | 28.0 | No | No |
run |
126 | 126 | No | 112 | No | 126 | No | 83 | No | 28.0 | No | No |
selectURL |
126 | 126 | No | 112 | No | 126 | No | 83 | No | 28.0 | No | No |
set |
126 | 126 | No | 112 | No | 126 | No | 83 | No | 28.0 | 126 | No |
worklet |
126 | 126 | No | 112 | No | 126 | No | 83 | No | 28.0 | No | No |
© 2005–2025 MDN contributors.
Licensed under the Creative Commons Attribution-ShareAlike License v2.5 or later.
https://developer.mozilla.org/en-US/docs/Web/API/SharedStorage