How to: Capture browser close button event or exiting the page in javascript.
A lot of times we have requirement to do some stuff like invalidating session whenever user clicks browser close button thereby invoking close event in browser. Let us see how to achieve this using...