JavaScript apparently waits for each AJAX call before sending another in a loop
- by itako
Hello.
Straight to the point:
I have this javascript:
for(item=1;item<5;item++)
{
xmlhttp=new XMLHttpRequest();
xmlhttp.open("GET",'zzz.php', true);
xmlhttp.send();
}
And in PHP file something like this:
usleep(5);die('ok');
Now the problem is javascript seems to be waiting for each ajax call to be completed before sending…