Unless I'm wrong, and I don't think I am, the session is technically still active on the server, meaning nothing has told PHP to unregister the session... someone correct me if I'm not right. As to anwering the specific question, I'm really not sure, but would think you could trap the browser closing/leaving via javascript and pass the event back to your server and get rid of the session data.