DOM Window unload event, is it reliable?

后端 未结 2 1020
借酒劲吻你
借酒劲吻你 2020-12-10 02:31

Can I rely on the window unload event to be triggered when a user closes a tab/window/browser?

Edit:

Found a list of what triggers the unload event in IE. ht

2条回答
  •  半阙折子戏
    2020-12-10 03:09

    Not in all circumstances no. The browser could crash etc. keeping the event from firing. The user could also use add-ons like Grease Monkey to prevent the event from firing also.

提交回复
热议问题