The closing of a window in JavaScript is technically quite easy for a Desktop Browser environment. However, with Mobile Browsers suppressing different properties and methods, closing windows in Mobile Browsers become a nightmare.
Alert messages can be used to notify the user about something special: danger, success, information or warning.
So our question is as follows:
How to show an alert message when closing a Mobile Browser window?