-
Notifications
You must be signed in to change notification settings - Fork 22.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Clarify localStorage maximum #32225
Clarify localStorage maximum #32225
Conversation
Preview URLs (comment last updated: 2024-04-10 00:26:46) |
Thanks for your PR, @smith558 ! These days the definitive place where we talk about storage limits is https://developer.mozilla.org/en-US/docs/Web/API/Storage_API/Storage_quotas_and_eviction_criteria. So I think it would be better not to talk about storage limits in https://developer.mozilla.org/en-US/docs/Web/API/Web_Storage_API, and instead link to https://developer.mozilla.org/en-US/docs/Web/API/Storage_API/Storage_quotas_and_eviction_criteria. So what I think we should do here is: delete both bullets that start with "Storage limit is...", and after the following paragraph (the one beginning "These mechanisms are..." have a new paragraph, something like:
|
Hi @smith558 - there are some reviewer comments outstanding for you to take a look at. Do you plan to come back to this one? Thank you :) |
Hi. Thanks for the reminder. Will have a look at this within the next few days. |
Hi @smith558 - are you okay with maintainers making the suggested changes to your branch? Will has suggested something like this (deletions in red and additions in green): - `localStorage` does the same thing, but persists even when the browser is closed and reopened.
-
- - Stores data with no expiration date, and gets cleared only through JavaScript, or clearing the Browser cache / Locally Stored Data.
- - Storage limit is usually also at most 5MB (may vary between browsers).
These mechanisms are available via the {{domxref("Window.sessionStorage")}} and {{domxref("Window.localStorage")}} properties (to be more precise, the `Window` object implements the `WindowLocalStorage` and `WindowSessionStorage` objects, which the `localStorage` and `sessionStorage` properties hang off) — invoking one of these will create an instance of the {{domxref("Storage")}} object, through which data items can be set, retrieved and removed. A different Storage object is used for the `sessionStorage` and `localStorage` for each origin — they function and are controlled separately.
+To learn about the amount of storage available using the APIs, and what happens when storage limits are exceeded, see [Storage quotas and eviction criteria](/en-US/docs/Web/API/Storage_API/Storage_quotas_and_eviction_criteria).
|
Yes! Apologies, I have been pretty tight with my schedule recently. |
This pull request has merge conflicts that must be resolved before it can be merged. |
@bsmth , I made some slightly more extensive changes. It's still not great but better. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, both! Looks good to me 👍🏻
Updated according to https://developer.mozilla.org/en-US/docs/Web/API/Storage_API/Storage_quotas_and_eviction_criteria#web_storage