Redirecting on closing window

JavaScript and client side scripting.

Moderator: General Moderators

Post Reply
m2babaey
Forum Contributor
Posts: 364
Joined: Sun May 20, 2007 9:26 am

Redirecting on closing window

Post by m2babaey »

Hi
I record the time of login and logout of users on my site
The problem is when users close the window before logging out, the log out time is not recorded?
Has anyone a solution for this?

For example is it possible to redirect to the logout page if the close button is clicked?

Thank you in advance for your help
josh
DevNet Master
Posts: 4872
Joined: Wed Feb 11, 2004 3:23 pm
Location: Palm beach, Florida

Re: Redirecting on closing window

Post by josh »

Ajax to post to the server their online status every 30 seconds, consider them offline if they haven't pinged in 60 seconds.
Post Reply