Showing dialogs are no longer allowed on page navigation events

Published: | Categories: DOM


Scripts to show dialogs using the alert, confirm or prompt functions on the beforeunload, unload or pagehide events are now ignored. This is a way to protect against DoS attacks where a malicious site prevents browser to be closed using an infinite loop at the time of closing a tab, reloading a page or navigating to a different page.