Skip to content

Commit

Permalink
Add more detail to storage.session docs (#24873)
Browse files Browse the repository at this point in the history
- Remove "Chrome 122" from article, as the 10 MB limit is the quota that
  has been agreed upon across browsers.

- Clarify the duration that the storage is kept in memory.

- Clarify the access level of storage, mention the setAccessLevel API.
  The article does not exist yet, but can be written as part of
  https://bugzilla.mozilla.org/show_bug.cgi?id=1724754 and/or
  https://bugzilla.mozilla.org/show_bug.cgi?id=1687778
  • Loading branch information
Rob--W authored Feb 27, 2023
1 parent 6564dba commit 51ed0c7
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,10 @@ browser-compat: webextensions.api.storage.session

{{AddonSidebar()}}

Represents the `session` storage area. Items in `session` storage are stored in memory and are not persisted to disk.
Represents the `session` storage area. Items in `session` storage are stored in memory for the duration of the browser session and are not persisted to disk.
By default, it's not exposed to content scripts, but this behavior can be changed through {{WebExtAPIRef("storage.StorageArea.setAccessLevel", "storage.session.setAccessLevel()")}}.

The browser may restrict the amount of data that an extension can store in the session storage area. For example, in Chrome 112, an extension is limited to storing 10MB of data in this storage area.
The amount of data that an extension can store in the session storage area is limited to 10 MB, unless stated otherwise in the [browser compatibility table](#browser_compatibility).

When the browser stops, all session storage is cleared. When the extension is uninstalled, its associated session storage is cleared.

Expand Down

0 comments on commit 51ed0c7

Please sign in to comment.