Lets say I have a page with button on it. When user clicks button - new window A opens.
I want that window A to be open only once, so even if user opens new tab and goes to same page with that button and clicks it - it shouldn't open 2nd window A and should instead focus on previous already open Window A.
Any solution to this?
Since chrome has new process for every tab - the variables are not shared between pages.
My solution was to ping update time to local storage every 5 seconds from original window A.
If user clicks button on new tab, it would check local storage and if Last update was less than 5 seconds ago - don't open window but if it was more than 5 seconds ago - open new window as it could mean the window A crashed or was closed or force closed.
That seems to be bad solution for Internet Explorer though as I think it would cause performance drop on page.
Any alternative solution to this?