pagehide event & sendBeacon
pagehide event & sendBeacon
通过 API 测试 pagehide 是否触发了
pagehide 不支持正常的 fetch 请求发送
pagehide 仅支持 sendBeacon 请求发送
pagehide 请求发送时机
Page Visibility API
https://developer.mozilla.org/en-US/docs/Web/API/Page_Visibility_API
Beacon API
https://developer.mozilla.org/en-US/docs/Web/API/Beacon_API/Using_the_Beacon_API
https://developer.mozilla.org/en-US/docs/Web/API/Navigator/sendBeacon
refs
https://www.runoob.com/nodejs/nodejs-http-server.html
©xgqfrms 2012-2020
www.cnblogs.com 发布文章使用:只允许注册用户才可以访问!
本文首发于博客园,作者:xgqfrms,原文链接:https://www.cnblogs.com/xgqfrms/p/14167399.html
未经授权禁止转载,违者必究!