In my project i need get when open my project i want t get all opened session storage for current browser.
I have tried like this but it gives current tab session storage
console.log(sessionStorage);
In my project i need get when open my project i want t get all opened session storage for current browser.
I have tried like this but it gives current tab session storage
console.log(sessionStorage);
It seems that you want to get all sessionStorage
objects for all the browser tabs that are opened. If that is the case, you cannot do that: sessionStorage
and localStorage
are both subject to the same-origin policy based on the host (even though a.domain.com
can access b.domain.com
storage object on some cases, that's largely frowned upon and should not generally be done).
If what you are looking for is a way to share data between multiple tabs of your own domain, use localStorage
instead of sessionStorage
.