We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
No description provided.
The text was updated successfully, but these errors were encountered:
Possible options
Before (A) - schedule repeating XHRs at fixed interval
var sendXHR = function(...) { var xhr = new XMLHttpRequest(); ... xhr.send(""); }; window.setInterval(sendXHR, 30)
Before (B) - chain next XHR after previous XHR
var sendXHR = function(...) { var xhr = new XMLHttpRequest(); ... xhr.send(""); xhr.onload = function() { ...; setTimeout(sendXHR, 30); }; };
After (1)
var sendXHR = function(...) { var xhr = new XMLHttpRequest(); ... xhr.oncachechanged = sendXHR; xhr.send(""); };
After (2) - defers response when previous answer already known
var sendXHR = function(...) { var xhr = new XMLHttpRequest(); ... xhr.setRequestHeader("Prefer", "wait=30"); // RFC 7240 xhr.send(""); xhr.onload = function() { ...; sendXHR(...); }; };
Sorry, something went wrong.
Possible progress event use case. Source: https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest/responseType
No branches or pull requests
No description provided.
The text was updated successfully, but these errors were encountered: