Skip to content

Commit 99433a2

Browse files
authoredSep 20, 2024··
doc: add more details for localStorage and sessionStorage
PR-URL: #53881 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
1 parent 2a1607c commit 99433a2

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed
 

Diff for: ‎doc/api/globals.md

+5-3
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)
Please sign in to comment.