mdn / mdn/content

Web Storage API documentation pages fail to mention state partitioning

Open
#43,255 1 comment 0 reactions 0 assignees View on GitHub
Content:WebAPI effort: medium goal: up-to-date help wanted
Dominant language
Markdown
Stars
11k
Forks
23.2k
Avg merge
2d 9h
Merged PRs (30d)
331

Description

### MDN URL

https://developer.mozilla.org/en-US/docs/Web/API/Window/localStorage

### What specific section or headline is this issue about?

_No response_

### What information was incorrect, unhelpful, or incomplete?

The documentation specifies that localStorage is keyed by document origin only. This was true when the storage API was first introduced, but it is no longer accurate; these days localStorage is also keyed by top-level site using the [State Partitioning](https://developer.mozilla.org/en-US/docs/Web/Privacy/Guides/State_Partitioning) mechanism. The page on localStorage makes no mention of this, which is very misleading to anyone not already familiar with state partitioning.

The same problem applies to the https://developer.mozilla.org/en-US/docs/Web/API/Window/sessionStorage and https://developer.mozilla.org/en-US/docs/Web/API/Web_Storage_API pages.

### What did you expect to see?

The web storage API introduction page, and the pages on the localStorage and sessionStorage objects themselves, should mention the state partitioning mechanism. Claims like "localStorage is partitioned by origin only" are _incorrect_ in 2026.

### Do you have any supporting links, references, or citations?

_No response_

### Do you have anything more you want to share?

_No response_

### MDN metadata

Page report details

* Folder: `en-us/web/api/window/localstorage`
* MDN URL: https://developer.mozilla.org/en-US/docs/Web/API/Window/localStorage
* GitHub URL: https://github.com/mdn/content/blob/main/files/en-us/web/api/window/localstorage/index.md
* Last commit: https://github.com/mdn/content/commit/ca26363fcc6fc861103d40ac0205e5c5b79eb2fa
* Document last modified: 2025-11-30T02:30:55.000Z

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.