Why is jQuery unload not working in chrome and safari?

后端 未结 7 867
逝去的感伤
逝去的感伤 2020-12-05 17:42

unload function in jQuery works fine in Firefox but not in chrome and safari. please check this fiddle in chrome and Firefox. http://jsfiddle.net/jeevankk/Gywnw/2/ . Alerts

7条回答
  •  伪装坚强ぢ
    2020-12-05 18:24

    "refresh" action in the Firefox does not fire the unload event.

    We should use onbeforeunload instead.

    Confirm with Firefox version 47, Mac OS X

提交回复
热议问题