title: SocketIO - Does a browser refresh cause "on disconnect" to fire?
body: <p>I'm using SocketIO and I need to disconnect a socket on the server side if the user presses refresh. I've tried implementing this like so:</p>
  
  <pre><code>io.on('disconnect', function(socket) {
      socket.close();
  })
  </code></pre>
  
  <p>But the <code>disconnect</code> event isn't firing. Is this intended behaviour and if so is there any way to disconnect a socket when a page is refreshed?</p>