title: How to know if the user is still online on the website or offline
body: <blockquote>
    <p><strong>Possible Duplicate:</strong><br>
    <a href="https://stackoverflow.com/questions/5634156/check-if-user-is-offline">Check if user is offline</a>  </p>
  </blockquote>
  
  
  
  <p>I'm building a community website. Users will login and logout as usually.
  I use the attribute status online/offline to set the user's status. But what if a user just clicks the X button or disconnects otherwise without logging out?
  it shows login status.How i get to know user is currently  online or not ?</p>