Detect Event Of Browser Close Button When [X] Is Clicked
The Web Dev Zone is brought to you by Stormpath—offering a pre-built Identity API for developers. Easily build powerful user management, authentication, and authorization into your web and mobile applications. Download this Forrester report on the new landscape of Customer Identity and Access Management.
Some times we need to detect the Browser Close to perform some operation before quiting from application. Here is a simple way.
Call this Method From Body Unload
// Check Browser Close [X] , Alt+F4 , File -> Close
if(window.event.clientX Spring Framework