poorejc commented on issue #50:
URL: 
https://github.com/apache/incubator-flagon-useralejs/issues/50#issuecomment-801272089


   Regarding what methods to use instead: 
   
   https://developers.google.com/web/updates/2018/07/page-lifecycle-api and 
https://developer.mozilla.org/en-US/docs/Web/API/Navigator/sendBeacon (see 
Avoid unload and beforeunload). This appears to indicate that our sendOnClose 
function is using obsolete methods in modern browsers that have been optimized 
for cross-platform (desktop and mobile). 
   
   Both mozilla and chrome advocate for using visibilitychange events and 
detecting when the page's visible state is hidden.
   
   This method seems to capture the intent of sendOnClose, which is to dump 
logs when users are ending their session with a page/app.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Reply via email to