title: How to delete data from database when session dont exists
body: <p>I'm developing a chat module for my application...</p>
  <ol>
  <li><p>I'm opening a window for users to chat, is there way that when users close the chat window, I can update status of that record...i mean event for the closed browser?</p>
  </li>
  <li><p>I know that default session time is 24mins,
  so after 24mins of inactivity, user will be kicked out from the site and will asked to login once again.</p>
  </li>
  </ol>
  <p>How to delete/flush the data in my database, when user has no activity for 24mins (when user is logged out from the session due to inactivity)?</p>