Hi!
When you click the close button of a browser, the onUnload function is automatically called. So you can define something like this in your HTML
<body onUnload="invalidateSession()">
But there is a catch to this. The onUnload is called whenever the user leaves your page. So if the user simply clicks on a link or submits a form, his session will also be invalidated! Luckily for you, a really good hacker found a
workaround for this problem.
But if you ask me, I would go with Ron's suggestion to just let the session timeout do its thing. Hope this helps!
- Nikki