Hi, Most browsers, and most servers, limit the number of simultaneous requests between the same two endpoints. Usually that limit is two requests at a time, although I've also seen it be just one. Some browsers let the user configure it.
You can count on one (obvious -- well, to the extent you can count on networks at all); more than that and all bets are off. This isn't at the Prototype level, it's at the browser and server HTTP implementation level. HTH, -- T.J. Crowder Independent Software Consultant tj / crowder software / com www.crowdersoftware.com On Nov 10, 4:05 am, aerox <amyne.berr...@me.com> wrote: > hi all, > i'm using prototype to perform 3 ajax request at the same time in the > same page. > > the probeleme is i have the impression that my requests are not > asynchronous : > > i call first a page named foo.php => do a sleep(40) > and second a page named bar.php => echo "toto"; > > my javascript code: > > function test1(){ > var MyAjax = new Ajax.Request(/foo.php,{ > method: 'get', > asynchronous:true, > encoding: 'UTF-8', > onSuccess: function(){ > return; > }, > onFailure: function(){ > return; > }); > > } > > function test2(){ > var MyAjax = new Ajax.Request(/bar.php,{ > method: 'get', > asynchronous:true, > encoding: 'UTF-8', > onSuccess: function(){ > return; > }, > onFailure: function(){ > return; > }); > > } > > <a href="#" onclick="test1();test2();return false;">Start Test</a> > > i can see with firebug that the both request take 40s to be executed. > or when i execute only test2(); it take 20ms. > > it's like the second request wait for the first to finish executing > together ??!! > > any ideas ? --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Prototype & script.aculo.us" group. To post to this group, send email to prototype-scriptaculous@googlegroups.com To unsubscribe from this group, send email to prototype-scriptaculous+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/prototype-scriptaculous?hl=en -~----------~----~----~----~------~----~------~--~---