content
content copied to clipboard
Clarify localStorage maximum
Updated according to https://developer.mozilla.org/en-US/docs/Web/API/Storage_API/Storage_quotas_and_eviction_criteria#web_storage
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:
To learn about the amount of storage available using the APIs, and what happens when stprage limits are exceeded, see Storage quotas and eviction criteria.
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 @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).
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.