Unity WebGL switch to already opened tab

Hi,

if I open a link via a WebGL build it opens it in a new tab every time I call it. Is there possibly a way to check if the link was already opened or if a tab with that link already exists and just switch the tabs in the browser instead of opening a new tab over and over again?

Thanks in advance!

if I open a link via a WebGL build

You have to be way more specific here. Do you mean you open another seperate website from inside your WebGL build? If so, how do you do that?

This all boils down to pure browser behaviour and most techniques involve javascript and is not necessarily supported in all browsers since the behaviour may depend on the user settings. However you generally can specify a “target” window where a link should be opened in. Usually when you want to open a link in a new tab, you would use the special name “_blank”. Any other value will try to open the link in a window / tab with that name. If the name does not exist the browser will open a tab / windows and give it that name. So subsequent links with the same target should open in the same tab / window.