Fri Aug 02, 2002 11:43 am
When a browser is closed it doesn't send any information back to the website (at least not that I'm aware of). In between serving pages the server doesn't know if the browser still exists or not. The session is managed by use of a cookie (the session manages it automatically) which is set to expire immediately, so as long as your browser window doesn't close the cookie value (and therefore session ID) will remain active.
If you wanted to log a user out you could put an Javascript onUnload command in the body tag to open up a new window (Goodbye page, or 'Logging you Out' which would contain the code to log a user out), and this will be executed when a user leaves the page.
Of course you don't want this to happen every time they change a page, so you might want to make some use of frames and put the code within the frameset, so when they leave the site or close the browser it'll activate the code.
I've never actually tried it myself, but in theory it should work. You might have to play around a bit with it first.