mdn / content

The content behind MDN Web Docs
https://developer.mozilla.org
Other
9.2k stars 22.49k forks source link

Missing info of copying sessionStorage on creating new context #18323

Open szalonna opened 2 years ago

szalonna commented 2 years ago

MDN URL

https://developer.mozilla.org/en-US/docs/Web/API/Window/sessionStorage

What specific section or headline is this issue about?

No response

What information was incorrect, unhelpful, or incomplete?

In the HTML Living standard - webstorage under sessionStorage getter there is a note mentioning that there is a case when the content of the sessionStorage is copied to a new context. I think this edge case is not mentioned in the page, or not highlighted enough. The only content which mentions this behavior is the following sentence:

Opening a page in a new tab or window creates a new session with the value of the top-level browsing context, which differs from how session cookies work.

I think this is ambiguous and does not highlight nor the copy of the content of the sessionStorage, nether the disconnect between the two sessionStorage and the "top-level browsing context" may not highlight the source of the copied sessionStorage as this is not a day-to-day expression devs may use.

What did you expect to see?

I would love to see a subsection dedicated to this behavior with the following content:

Do you have any supporting links, references, or citations?

No response

Do you have anything more you want to share?

I love MDN, I love the content, I love what you did and do there. Keep up the good work!

MDN metadata

Page report details * Folder: `en-us/web/api/window/sessionstorage` * MDN URL: https://developer.mozilla.org/en-US/docs/Web/API/Window/sessionStorage * GitHub URL: https://github.com/mdn/content/blob/main/files/en-us/web/api/window/sessionstorage/index.md * Last commit: https://github.com/mdn/content/commit/cc1f5c3bd1a9976a0668eeee016f6afc144533b0 * Document last modified: 2022-06-03T04:32:25.000Z
muntiMedia commented 2 years ago

To open a new window try window.open('http://example.com/redirect/path);

szalonna commented 2 years ago

@Techi-Dev how is this relevant to this issue?