How to logout a user from all the windows automatically?
Posted in Help the coder! on Sep 25, 2009 at 15:39 IST (10 months ago). Subscribe to this post
Email
Showing comments 1 to 4 of total 4 on page 1 of 1
Post replyShowing comments 1 to 4 of total 4 on page 1 of 1
« Previous1Next »
nonameRank: 73
How to logout a user from all the windows automatically? Consider that a user opened the site(or site's various pages) in multiple tabs while he was online. But once the user logs out from any of this tab(instance), i need all the other ones to log him out automatically.
Most of you must have seen this feature while using gmail, all the other opened instances refreshes automatically if we log out from any one of the instances(tabs).
How can i do this?
Most of you must have seen this feature while using gmail, all the other opened instances refreshes automatically if we log out from any one of the instances(tabs).
How can i do this?
Posted by noname on Friday, September 25, 2009, 3:39 pm
nonameRank: 73
Thank god u didnt advise to shut down the system!
are u for real dude??
are u for real dude??
Posted by noname on Friday, September 25, 2009, 3:50 pm
cerulean...Rank: 3
Okay, I misunderstood you. Now I got your point, apologies for the lame reply.
You might need to use AJAX to do this. Have a request be sent to your server periodically and the server side component will reply whether the user is logged in or not. Once your poll script gets a reply from the server saying the user is now logged out, just call the JavaScript equivalent of close window command.
You might need to use AJAX to do this. Have a request be sent to your server periodically and the server side component will reply whether the user is logged in or not. Once your poll script gets a reply from the server saying the user is now logged out, just call the JavaScript equivalent of close window command.
Thankful users: noname
Posted by ceruleancode on Friday, September 25, 2009, 5:55 pm
Pages: « Previous1Next »