Skip to content

Commit 09236ee

Browse files
Rekl0wlouwers
authored andcommitted
doc: add more details for localStorage and sessionStorage
PR-URL: nodejs#53881 Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: James M Snell <[email protected]>
1 parent 8ed4944 commit 09236ee

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

doc/api/globals.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -592,8 +592,11 @@ added: v22.4.0
592592
593593
A browser-compatible implementation of [`localStorage`][]. Data is stored
594594
unencrypted in the file specified by the [`--localstorage-file`][] CLI flag.
595+
The maximum amount of data that can be stored is 10 MB.
595596
Any modification of this data outside of the Web Storage API is not supported.
596597
Enable this API with the [`--experimental-webstorage`][] CLI flag.
598+
`localStorage` data is not stored per user or per request when used in the context
599+
of a server, it is shared across all users and requests.
597600

598601
## `MessageChannel`
599602

@@ -972,9 +975,8 @@ added: v22.4.0
972975
> Stability: 1.0 - Early development.
973976
974977
A browser-compatible implementation of [`sessionStorage`][]. Data is stored in
975-
memory, with a storage quota of 10 MB. Any modification of this data outside of
976-
the Web Storage API is not supported. Enable this API with the
977-
[`--experimental-webstorage`][] CLI flag.
978+
memory, with a storage quota of 10 MB. `sessionStorage` data persists only within
979+
the currently running process, and is not shared between workers.
978980

979981
## `setImmediate(callback[, ...args])`
980982

0 commit comments

Comments
 (0)