If I open an app (SPA) in multiple tabs (manually opened tabs), I want to make some of the information persistent as a session for each tab. session storage does this job.
But when I right click on an anchor and then select “open in new tab” in specific tab, I want to pass that session storage into the new opened tab.
The local storage does not work for this, because I want each tab to hold independent data, but those tabs that are opened from another tab to access the opener data.
There should be a place to keep a data in each tab, where:
- tabs that are opened from another tab, to have access to that opener place
- tabs that are manually opened to not be able to read data from that place
When I middle-click with the mouse on the refresh button of the browser, It opens a new tab and passes the session storage from the current tab into the new opened tab. I want something like this to happen when I right click and select “open in new tab” on an anchor.
How I can achieve this behaviour?
Without adding information to the link url/query params