-
Notifications
You must be signed in to change notification settings - Fork 133
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
XMLHttpRequest #193
Comments
Please use Marking this as a duplicate of #20. |
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:[email protected]]
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 <#20>
.
-
You are receiving this because you authored the thread.
Reply to this email directly, view it
<#193 (comment)> on
GitHub, or mute
<https://github.com/notifications/unsubscribe-auth/AJrwrwBC52SwW9quk0PeJ7UcI
6OEJzY9ks5tWwVbgaJpZM4SMWSL> the thread.
<https://github.com/notifications/beacon/AJrwrxSSIHmkavmo-PnQyp2q6UJ9VgQYks5
tWwVbgaJpZM4SMWSL.gif>
|
I removed the experimental label from https://developer.mozilla.org/en-US/docs/Web/API/Navigator/sendBeacon if that's what you're referring to. That was simply out-of-date. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Why are you removing the abilility to execute an XMLHttpRequest syncronously?
I agree that that misuse of this feature can create unresponsive web pages but careful use (i.e. in the pagehide event) enables AJAX based feed back mechanisms to work on some popular yet awkward browsers (i.e. Firefox).
Most sensible web developers are aware that misusing this feature is undesirable and use the asyncronous option. I feel that removing such a feature because of its detrimental effects to the end user's experience is a very poor decision akin to chopping of a childs hand because it does not know how to use it.
I assume the decision is based on the lowest common denominator principle - when a few are morons treat us all like morons.
The text was updated successfully, but these errors were encountered: