Last updated on January 13th, 2022 at 12:53 pm
This script will help you to detect browser close event and alert some messages. Even this script will be useful to call some ajax functions which terminate connection to Database or something related.
Tested on latest version of Chrome and Internet Explorer 11.0 and Microsoft Edge. [Last validated on Sept 24th 2016]
You can also try this code