Re: [whatwg/xhr] XMLHttpRequest (#193)

Hi There

 

Unfortunately 'navigator.sendBeacon()' is Experimental and cannot be used in
a live production application.

 

I need a solution I can rely on being around for the foreseeable future (the
site is currently used by thousands of UK train drivers for safety
training).

 

In short I want to send data to a server when a driver leaves the training
page.

 

Using a synchronous AJAX call is the only way I currently know of updating
my server in the PageHide event that works on the 5 browsers I support
(Google, Apple, Micrososft and Firefox - Desktop and Mobile).

 

This is the ONLY reason, to date, I have found to use synchronous
XMLHttpRequest I/O.

 

My reason for using this feature is because it exists, it works and does not
cause my users any problems which seems like a good reason to me.

 

Regards

 

Nigel

 

 

  _____  

From: Anne van Kesteren [mailto:notifications@github.com] 
Sent: 20 February 2018 17:48
To: whatwg/xhr
Cc: nhatchett; Author
Subject: Re: [whatwg/xhr] XMLHttpRequest (#193)

 

Please use navigator.sendBeacon() instead for that purpose. It's not a good
reason for synchronous I/O.

Marking this as a duplicate of #20 <https://github.com/whatwg/xhr/issues/20>
.

-
You are receiving this because you authored the thread.
Reply to this email directly, view it
<https://github.com/whatwg/xhr/issues/193#issuecomment-367059921>  on
GitHub, or mute
<https://github.com/notifications/unsubscribe-auth/AJrwrwBC52SwW9quk0PeJ7UcI
6OEJzY9ks5tWwVbgaJpZM4SMWSL>  the thread.
<https://github.com/notifications/beacon/AJrwrxSSIHmkavmo-PnQyp2q6UJ9VgQYks5
tWwVbgaJpZM4SMWSL.gif> 


 



-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/whatwg/xhr/issues/193#issuecomment-367080192

Received on Tuesday, 20 February 2018 18:54:05 UTC