Click here to Skip to main content
15,896,606 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi,

I want to know that any user is login on my site.

How can I know he is online or offline in any moment?

I know very well if he click on sign out button then I know that he is offline.

But he does not click on sign out button and he close the browser directly with cross (X) button or his internet connection is lost in that moment, then how can I know about online or offline details ?


Plz if any one have answer on this question. Share me ....
Posted

1 solution

Because of the disconnected nature of the web there is no way to ensure that server will know at all time if client closed window.
But! this article gives you some solution that will work in most cases: How to end user session when browser closed[^]
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900