I am exploring ways to determine if the current page is open in another tab.
After attempting to use window.open(), I found that it returns the current window rather than a different window with the same address. This results in always returning true.
For example, if 'mysite.com' is already open and the user opens a new tab with 'mysite.com', I want to be able to detect this, switch focus to the existing window, and close the current one.
If you have any suggestions or insights on accomplishing this task, please share. My ultimate goal is to consolidate all links into a single tab for a better user experience.