Skip to content

Commit 4244f1a

Browse files
Rekl0wtargos
authored andcommitted
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 327a8f7 commit 4244f1a

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

doc/api/globals.md

+5-3
Original file line numberDiff line numberDiff line change
@@ -571,8 +571,11 @@ added: v22.4.0
571571
572572
A browser-compatible implementation of [`localStorage`][]. Data is stored
573573
unencrypted in the file specified by the [`--localstorage-file`][] CLI flag.
574+
The maximum amount of data that can be stored is 10 MB.
574575
Any modification of this data outside of the Web Storage API is not supported.
575576
Enable this API with the [`--experimental-webstorage`][] CLI flag.
577+
`localStorage` data is not stored per user or per request when used in the context
578+
of a server, it is shared across all users and requests.
576579

577580
## `MessageChannel`
578581

@@ -951,9 +954,8 @@ added: v22.4.0
951954
> Stability: 1.0 - Early development.
952955
953956
A browser-compatible implementation of [`sessionStorage`][]. Data is stored in
954-
memory, with a storage quota of 10 MB. Any modification of this data outside of
955-
the Web Storage API is not supported. Enable this API with the
956-
[`--experimental-webstorage`][] CLI flag.
957+
memory, with a storage quota of 10 MB. `sessionStorage` data persists only within
958+
the currently running process, and is not shared between workers.
957959

958960
## `setImmediate(callback[, ...args])`
959961

0 commit comments

Comments
 (0)