Rule #1 - you cannot close a browser window by issuing an instruction from
the server.
Rule #2 - a user does not have to use any logout mechanism that you provide,
he can simply close the browser window.
This means that the user may have finished with your application but your
application still records him as "active".
If you write your session data to a database file you can store the user_id
in each record. Then during the garbage collection on the session table you
can extract the user_id an update that record to "logged_in=FALSE" or
whatever.
--
Tony Marston
http://www.tonymarston.net
"Mitul" <pa***********@gmail.com> wrote in message
news:11**********************@p10g2000cwp.googlegr oups.com...
Hi to all,
I am working on a site in which I need to check whether user is online
or not. If user successfully logged out then I can change status from
online to offline but if user do not logged out and close the browser
or session timeout then in both of the case I do not handle how to
change user's status from online to offline.
Please help me to overcome the problem. Looking forward to reply from
all of you.
With Regards & thanks,
Mitul Patel