- Do tabs share the same session?
- Is it possible to detect if a user has opened a link in a new tab?
- How do you prevent a user from opening the same URL in multiple tabs in the same browser?
- How to check how many tabs you have open in JavaScript?
Do tabs share the same session?
UI Sessions
Since all browser windows and tabs share the same server session, each instance of Maximo opened in a browser window or tab needs a different UI Session so the state of each browser window can be maintained independently.
Is it possible to detect if a user has opened a link in a new tab?
A website shouldn't be able to detect a new tab, per se (that would be a huge security risk), but it can detect when you leave focus and react accordingly.
How do you prevent a user from opening the same URL in multiple tabs in the same browser?
The solution was to use StorageEvents: every window receives a StorageEvent whenever another(!) window made changes to the same localStorage as this one uses. Save this answer.
How to check how many tabs you have open in JavaScript?
query(windowType:'normal', function(tabs) console. log('Number of open tabs in all normal browser windows:',tabs. length); );