How to prevent IE11 from appearing (are you sure you want to leave this page)

I am working on a page that I have nothing to print, but a drop-down list for selection, but in IE11, when I try to go to the next page, it will display a message. I would like this to not happen. So I'm just wondering what the default behavior is that appears in IE11 (since it doesn't show in either Chrome or Firefox) and how to prevent a popup

+4
source share
2 answers

The more important question is: β€œWhy is IE11 giving this warning?”

Are you leaving a safe page for an insecure one? That is, do not forget to explicitly specify the protocol:

var url = '//api.booking_site.url/api_endpoint';

, URL-, .

, , , , , alert:

window.alert = function() { return true; }
+4

frombeforeforeload. , , null, .

. onBeforeUnload IE

+4

Source: https://habr.com/ru/post/1532677/


All Articles