Possible to detect if a user has multiple tabs of your site open?

I’m fairly late to the party here (over a year), but I couldn’t help but notice that you’d missed an incredibly easy and elegant solution (and probably what that website you saw used).

Using JavaScript you can change the name of the window you currently have open through:

window.name = "myWindow";

Then when you send out your confirmation email simply do (assuming you’re sending a HTML email):

<a href="https://stackoverflow.com/questions/4038629/verificationlink.php" target="myWindow">Verify</a>

Which should result in the verificationLink opening up inside the window your website was already loaded into, if it’s already been closed it’ll open up a new tab with the window name specified.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)