views:

75

answers:

5

I'm trying to find an elegant way to inform a user that s/he is about to be logged out and I know that most browsers will give you some indication that a hidden tab has an alert box open. I would like to duplicate this functionality without actually showing an alert box.

I have thought about forcing the tab/window to gain focus, but that is quite obtrusive and I hate it when websites do that to me, so I'm looking for something a little more subtle.

Any ideas?

Edit/Clarification: I already have a div that pops up if they are about to be logged out. My problem is that if they are on another tab, they won't be able to see that div, so I would like some way to notify the user that something important has happened on my tab so they go check it out and see the logout notice.

The favicon idea listed below is an excellent idea, any others?

+3  A: 

Here's an interesting way that comes to mind. When its time to be logged out, change the website's favicon dynamically. Newer browsers should be ok with it.

Look here: http://stackoverflow.com/questions/260857/changing-website-favicon-dynamically

Moin Zaman
+1  A: 

You could create a page that informs them they will be logged out in a certain amount of time with a button that would allow them to maintain their session. Or maybe you could use a lightbox modal popup window (example here).

mjw06d
A: 

Why not swap out a div styled how you want to change to let them know they will be logged out soon? Then, you can simply have it as a portion of your page with all the same style and formatting?

For example, your normal page has some sort of page element with visibility:block; and then before they will be logged out, you change that to visibility:none; and change your other element (in the same place) to have visibility:block;

Does this idea make sense? You have to be able to detect when this is happening with Javascript already to alert, so instead of altering you are just swapping out display elements.

I hope this is helpful,

-Brian J. Stinar-

Brian Stinar
+2  A: 

Some techniques I've seen:

  • Some sort of sound that's played (I think it's done with Flash in the case I'm thinking of, but maybe it's possible with HTML5's audio tag)
  • Flashing/alternating favicon
  • Use JavaScript to change the page title tag every 2s or so
chigley
+1 - Page title/favicon ideas are great. I hadn't thought about those!
Topher Fangio
For now I've decided to go with a title change. I may do the favicon as well later on. Thanks very much for your answer!
Topher Fangio
A: 

it probably doesn't go with what you're after but a simple modal window is probably a good idea? i know it doesn't alert the user instantly, and they won't see it unless they switch back to that tab, but it's unobtrusive and i believe most users would prefer not to have something rammed in their face!

If this notification is to be triggered by a user clicking "log out" or the likes then they will see it and it won't be as intrusive as forcing them to stop what they are doing and close the alert box.

And if it's due to time out or something similar then the user isn't overly concedrned or they would still be on that tab.

I think that this serves the best purpose in terms of usability as people don't want to be hassled or have their workflow broken by an alert shoved at them! A perfect example is Microsoft TFS which would constantly throw alerts at you when you got signed out, which got really frustrating, really quickly

so my answer is think how the user would like to be notified in the least obtrusive way :-)

mr.nicksta