title: socket.io on mobile - does not disconnect on device sleep, close browser, change tab
body: <p>I have a basic Socket.io implementation using NodeJS with Express server.
  (Basically the Get Started example on Socket.io web site)</p>
  
  <p>On desktop it connects/disconnects as expected. When you browse to the page the socket connects. Connection events are fired both on the client and server side. And she the user closes the browser, the socket disconnects.</p>
  
  <p>But on mobile the disconnect does not work as expected. When you browse to the page the socket connects, and events are fired. But the socket.io does not disconnect if the user</p>
  
  <ul>
  <li>closes the browser app (Safari or Android browser) (pressing the home button)</li>
  <li>switches to another app</li>
  <li>opens a new tab</li>
  <li>puts the device to sleep (pressing the sleep button)</li>
  </ul>
  
  <p>And the disconnect event is not fired on the server nor the client.</p>
  
  <p>I tried to detect those events via JavaScript using window.pagehide but it is also not firing properly.</p>
  
  <p>Does any one have any idea how to make sure the Socket.io disconnects when the user walks away from the page on mobile.</p>
  
  <p>Any help much appreciated.
  Doruk</p>