Irish SEO,  Marketing & Webmaster Discussion

 

Page Exit / logout

This is a discussion on Page Exit / logout within the Coding Help forums, part of the Webmaster Help category; Hi guys I was wondering if any of you of a good way of logging a person out when they ...


Go Back   Irish SEO, Marketing & Webmaster Discussion > Webmaster Help > Coding Help

Register Forum Rules FAQDonate Members List Calendar Search Today's Posts Mark Forums Read


Notices

Reply

 

LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 14-03-2007, 01:40 AM
Frodo's Avatar
Ciaran Rooney - Weeno Ltd
 
Join Date: Jan 2007
Location: London
Posts: 360
Nominated 0 Times in 0 Posts
TOTW/F/M Award(s): 0
Frodo has much to be proud ofFrodo has much to be proud ofFrodo has much to be proud ofFrodo has much to be proud ofFrodo has much to be proud ofFrodo has much to be proud ofFrodo has much to be proud ofFrodo has much to be proud ofFrodo has much to be proud of
Send a message via MSN to Frodo Send a message via Skype™ to Frodo
Question Page Exit / logout

Hi guys

I was wondering if any of you of a good way of logging a person out when they exit a page or after a period of inactivity. I have an ajax application and i need to know when people accidentally logout of it because when they login i change their status in a row in a mysql table but i need to know straight away when they log out to change the row again. Obviously there will be a log out button but i also need to know almost straight away if they leave the page, close the browser, are inactive for greater than X mins or for some reason the connection is dropped ie broadband goes down. I pretty sure i can whip some javascript type ajax thing for browser closing, page exits and inactivity but I'm not sure about a connection drop as its all client side scripting.

I was wondering if anyone knew a sure fire way of doing all this already??
Any help please?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #2 (permalink)  
Old 14-03-2007, 02:29 AM
niall's Avatar
Hosting Caretaker
 
Join Date: Jan 2007
Location: Carlow
Posts: 65
Nominated 0 Times in 0 Posts
TOTW/F/M Award(s): 0
niall will become famous soon enough
Send a message via ICQ to niall Send a message via MSN to niall
Default

Quote:
Originally Posted by Frodo View Post
I was wondering if anyone knew a sure fire way of doing all this already??
Any help please?
What language and are you using sessions? If so, have the logout button go to a page which destroys the session. Have the page the does the mysql queries check for the session. If the session isn't there, redirect to the login page.

Niall.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #3 (permalink)  
Old 14-03-2007, 02:39 AM
Frodo's Avatar
Ciaran Rooney - Weeno Ltd
 
Join Date: Jan 2007
Location: London
Posts: 360
Nominated 0 Times in 0 Posts
TOTW/F/M Award(s): 0
Frodo has much to be proud ofFrodo has much to be proud ofFrodo has much to be proud ofFrodo has much to be proud ofFrodo has much to be proud ofFrodo has much to be proud ofFrodo has much to be proud ofFrodo has much to be proud ofFrodo has much to be proud of
Send a message via MSN to Frodo Send a message via Skype™ to Frodo
Default

Sorry yea PHP I put in the tag's but forgot in the post. Logging someone out when they press logout is no problem, Its when they don't press it is the problem because they still need to be logged out straight away given any of the above scenarios.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #4 (permalink)  
Old 14-03-2007, 08:52 AM
louie's Avatar
Senior Member
 
Join Date: Jan 2006
Location: Dublin, Ireland
Posts: 2,048
Nominated 5 Times in 3 Posts
Nominated TOTW/F/M Award(s): 1
louie will become famous soon enoughlouie will become famous soon enoughlouie will become famous soon enoughlouie will become famous soon enoughlouie will become famous soon enoughlouie will become famous soon enoughlouie will become famous soon enoughlouie will become famous soon enough
Send a message via Yahoo to louie Send a message via Skype™ to louie
Default

the session will destroy itsefl after 20 min. of innactivity.
You can have a timer in java that checks the session and page the user is on and using ajax have the database updated automatically.

Also using java you can check to see when they leave your website (domain) and open a new window which will do the update and display the "you log out" message.
__________________
:. Web Design & Development Web Design Ireland
:. Search Engines Optimization Search Engines Optimization
:. Directory Submission Directory Submission
:. News & Press Release Ireland GiveItSocks.com
:. Used Cars Ireland, Car Parts & Car Audio Cars For Sale, Car Parts & Accessories
:. I Have 2 Find It Directory SEF Directory
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #5 (permalink)  
Old 14-03-2007, 12:08 PM
niall's Avatar
Hosting Caretaker
 
Join Date: Jan 2007
Location: Carlow
Posts: 65
Nominated 0 Times in 0 Posts
TOTW/F/M Award(s): 0
niall will become famous soon enough
Send a message via ICQ to niall Send a message via MSN to niall
Default

Sorry, should have read the question properly. You have a few options. One is to do as AIB do and have a meta tag in the which refreshes to the logout page after a certain period of inactivity. However this relies on the user keeping the page open.

The other is do use sessions with a fairly short timeout. Each time the user does somethin ajaxy restart the timer. If they try to something when the session has timed out, redirect to the login page, which should also reset the field in your db to logged out.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #6 (permalink)  
Old 14-03-2007, 01:07 PM
Frodo's Avatar
Ciaran Rooney - Weeno Ltd
 
Join Date: Jan 2007
Location: London
Posts: 360
Nominated 0 Times in 0 Posts
TOTW/F/M Award(s): 0
Frodo has much to be proud ofFrodo has much to be proud ofFrodo has much to be proud ofFrodo has much to be proud ofFrodo has much to be proud ofFrodo has much to be proud ofFrodo has much to be proud ofFrodo has much to be proud ofFrodo has much to be proud of
Send a message via MSN to Frodo Send a message via Skype™ to Frodo
Default

Quote:
Originally Posted by niall View Post
The other is do use sessions with a fairly short timeout. Each time the user does somethin ajaxy restart the timer. If they try to something when the session has timed out, redirect to the login page, which should also reset the field in your db to logged out.
Yea i'm kinda doing of doing something like this and some thing with the window.unload function maybe.

But these are client based hmmm boss is worried about peoples BB going down and them not being logged out at all from the db.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Reply

Tags
exit, logout, page

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump

Similar Threads

Thread Thread Starter Forum Replies Last Post
Successful Site in 12 Months with Google Alone montyauto Webmaster Articles 11 18-02-2008 01:28 PM
B2C and B2B on the same page Peter McC Webmaster Discussion 5 30-01-2007 01:19 PM
Web Development Quote ButtermilkJack Marketplace Requests 5 24-01-2007 11:04 AM
Page titles anthonymcg Webmaster Discussion 9 27-11-2006 03:54 PM
SEO and Images on your default page sinead Search Engine Optimisation 6 05-08-2006 09:33 PM


Sponsored links

Paid On Results


All times are GMT +1. The time now is 05:16 AM.


Powered by: vBulletin Version 3.7.3, Copyright ©2000 - 2008, Jelsoft Enterprises Limited.
Hosted in Ireland by Blacknight - Test your ISP |Irish Hosting Directory| Armchair.ie|Logo by Eden Web Design|Avatars by Afterglow |Latest Blog Entries | VPS HostingAd Management by RedTyger

Search Engine Friendly URLs by vBSEO 3.2.0