From b24f87986dbc98ef9d922071ee5b275a472d2d97 Mon Sep 17 00:00:00 2001 From: Batuhan Tomo <91488737+Rekl0w@users.noreply.github.com> Date: Fri, 20 Sep 2024 16:20:29 +0300 Subject: [PATCH] doc: add more details for localStorage and sessionStorage PR-URL: https://github.com/nodejs/node/pull/53881 Reviewed-By: Colin Ihrig Reviewed-By: James M Snell --- doc/api/globals.md | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/doc/api/globals.md b/doc/api/globals.md index a559004d7e3842..8c4867b6fef427 100644 --- a/doc/api/globals.md +++ b/doc/api/globals.md @@ -592,8 +592,11 @@ added: v22.4.0 A browser-compatible implementation of [`localStorage`][]. Data is stored unencrypted in the file specified by the [`--localstorage-file`][] CLI flag. +The maximum amount of data that can be stored is 10 MB. Any modification of this data outside of the Web Storage API is not supported. Enable this API with the [`--experimental-webstorage`][] CLI flag. +`localStorage` data is not stored per user or per request when used in the context +of a server, it is shared across all users and requests. ## `MessageChannel` @@ -972,9 +975,8 @@ added: v22.4.0 > Stability: 1.0 - Early development. A browser-compatible implementation of [`sessionStorage`][]. Data is stored in -memory, with a storage quota of 10 MB. Any modification of this data outside of -the Web Storage API is not supported. Enable this API with the -[`--experimental-webstorage`][] CLI flag. +memory, with a storage quota of 10 MB. `sessionStorage` data persists only within +the currently running process, and is not shared between workers. ## `setImmediate(callback[, ...args])`