views:

62

answers:

2

I'm just thinking about the whole site registration process.

A user goes to your site, signs up, and then you tell him you've sent him an email and he needs to verify his email address. So he hits Ctrl+T, pops open a new tab, hits his Gmail fav button, doesn't read a word of your lengthy welcome email, but clicks the first link he sees. Gmail opens your site in yet another tab...

He doesn't need nor want two tabs for your site open, he just wants to view that darn page you've disallowed him access to until he registers.

So what do we do? I saw one site (but I forget what it was) that did a really good job, and it actually refreshed the first tab I had open without me having to press anything.

I'm thinking, it might be nice if we can detect if the user already has a tab to your site open, we could either close the new verification-tab automatically, or tell him he can close it can go back to his other tab (which we've now refreshed and logged him in).

Or, maybe when he got your annoying "please check your email" message, he went directly to his email, replacing your site with his email knowing full well that the email will link him back to the site again. In that case, we don't want to close the tab, but maybe could have saved his location from before, and redirect him there again?

Anyway, that's just the use case... the question still stands. Can we detect if a user already has a tab to your site open?


This question is not about how to detect when a user has completed the sign-up process. Ajax polling or comet can solve that issue. I specifically want to know if the user already has a tab open to your site or not.

+1  A: 

You can send an AJAX request every X seconds from the original tab that asks the server if it received a request from the email.

You cannot close the second tab automatically, but you could have it ask the server after 3X seconds whether it heard from the first tab.

SLaks
A: 

The user will still have a session at the server. Why not store the user's location prior to registration, and when they confirm their registration, read the location back out of the session and redirect back to that page. No tab magic required. It's certainly not what I'd expect from a signup process.

spender
Then you'd still have the first tab.
SLaks
Yes. That's what happens in a signup process. We're well used to it.
spender
Then both tabs have the same page open... we don't need two with the exact same page. I'm asking how I can close one of them.
Mark
They wouldn't though. You'd have one tab with the final page of your signup, the other with your destination. What do you intend to do when you've discovered the other tab? Try to close it? That's unexpected.
spender
Then inform them that they *can* close it because the *other* tab contains the info they want. And it wouldn't contain the "final page of the signup" because we've just redirected them, remember? My suggestion was (a) if the user has two tabs open, close one, or inform him that it can be closed, and refresh the other, or (b) if the user already closed the original tab, then redirect the new one
Mark