Browsers such as Chrome can only execute 6ish parallel requests.
If we attempt to simultaneously initiate more than 6 requests at once,
for (var i = 0; i < 11; 1++) {
var oReq = new XMLHttpRequest();
oReq.open('GET', URL);
oReq.send();
}
then the browser will queue them up and execute them in batches of 6.
Is it possible to tell when a request had moved from the "waiting" state to actually being executed?
The onloadstart
event seems to fire when the request is added to the queue rather than when it actually starts loading.