Skip to content
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

Updating sessionStorage is not firing storage event. Only updating localStorage fires the storage event. #34162

Closed
mayank1513 opened this issue Jun 14, 2024 · 2 comments
Labels
closed: duplicate This issue or pull request already exists Content:WebAPI Web API docs

Comments

@mayank1513
Copy link

MDN URL

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

What specific section or headline is this issue about?

Window: storage event

What information was incorrect, unhelpful, or incomplete?

Updating sessionStorage is not firing storage event. Only updating localStorage fires the storage event.

What did you expect to see?

When I update sessionStorage on one tab, the storage event (similar to the one that is fired when I update the localStorage) should be fire in the other tab with the same url.

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

I tested on local machine

Do you have anything more you want to share?

No response

MDN metadata

Page report details
@mayank1513 mayank1513 added the needs triage Triage needed by staff and/or partners. Automatically applied when an issue is opened. label Jun 14, 2024
@github-actions github-actions bot added Content:WebAPI Web API docs and removed Content:WebAPI Web API docs labels Jun 14, 2024
@Josh-Cena
Copy link
Member

Two browser tabs with the same URL still have conceptually distinct sessionStorage. That's not how you use the storage event. The only way to have shared sessionStorage is to use iframes on the same tab.

We can probably have an example and more clarifications.

@Josh-Cena Josh-Cena added help wanted If you know something about this topic, we would love your help! Content:WebAPI Web API docs and removed needs triage Triage needed by staff and/or partners. Automatically applied when an issue is opened. labels Jun 14, 2024
@Josh-Cena
Copy link
Member

Actually duplicate of #30598

@Josh-Cena Josh-Cena closed this as not planned Won't fix, can't repro, duplicate, stale Jun 14, 2024
@Josh-Cena Josh-Cena added closed: duplicate This issue or pull request already exists and removed help wanted If you know something about this topic, we would love your help! labels Jun 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
closed: duplicate This issue or pull request already exists Content:WebAPI Web API docs
Projects
None yet
Development

No branches or pull requests

2 participants