window « Browser « JSP-Servlet Q&A





1. Javascript onbeforeunload close browser window    stackoverflow.com

I have this tiny script for now that checks if any change is made on the form. If there is a change then I set a flag to 'Y'. I call this ...

2. Close browser window    coderanch.com

4. trace the browser window closing in a servlet/jsp    coderanch.com

and even then there's no guarantee. Not all ways in which a browser window can be closed will result in a Javascript event being fired. If there were you could in a Javascript event handler do a request to the server which would launch some cleanup code or whatever, but this isn't reliable (as we found out, one of our marketing ...