How many concurrent AJAX (XmlHttpRequest) requests are allowed in popular browsers?

后端 未结 8 1339
无人共我
无人共我 2020-11-21 11:37

In Firefox 3, the answer is 6 per domain: as soon as a 7th XmlHttpRequest (on any tab) to the same domain is fired, it is queued until one of the other 6 finish.

Wha

8条回答
  •  被撕碎了的回忆
    2020-11-21 11:54

    I have writen a single file AJAX tester. Enjoy it!!! Just because I have had problems with my hosting provider

    
    
    
    
    
    
    concurrent json requests
     
    Elapsed Time:

    Edit:
    r means row and w waiting time.
    When you initially press start button 80 (or any other number) of concurrent ajax request are launched by javascript, but as is known they are spooled by the browser. Also they are requested to the server in parallel (limited to certain number, this is the fact of this question). Here the requests are solved server side with a random delay (established by w). At start time all the time needed to solve all ajax calls is calculated. When test is finished, you can see if it took half, took third, took a quarter, etc of the total time, deducting which was the parallelism on the calls to the server. This is not strict, nor precise, but is nice to see in real time how ajaxs calls are completed (seeing the incoming cross). And is a very simple self contained script to show ajax basics.
    Of course, this assumes, that server side is not introducing any extra limit.
    Preferably use in conjunction with firebug net panel (or your browser's equivalent)

提交回复
热议问题