Skip to main content

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


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.



What are the numbers for the other major browsers?



Also, are there ways around these limits without having my users modify their browser settings? For example, are there limits to the number of jsonp requests (which use script tag injection rather than an XmlHttpRequest object)?



Background: My users can make XmlHttpRequests from a web page to the server, asking the server to run ssh commands on remote hosts. If the remote hosts are down, the ssh command takes a few minutes to fail, eventually preventing my users from performing any further commands.


Source: Tips4allCCNA FINAL EXAM

Comments

  1. One trick you can use to increase the number of concurrent conncetions is to host your images from a different sub domain. These will be treated as seperate requests, each domain is what will be limited to the concurrent maximum.

    IE6, IE7 - Have a limit of two. IE8 is 6 if your a broadband, 2 if you are dial up.

    ReplyDelete
  2. The network results at Browserscope will give you both Connections per Hostname and Max Connections for popular browsers. The data is gathered by running tests on users "in the wild," so it will stay up to date.

    ReplyDelete
  3. With IE6 / IE7 one can tweak the number of concurrent requests in the registry. Here's how to set it to four each.

    [HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings]
    "MaxConnectionsPerServer"=dword:00000004
    "MaxConnectionsPer1_0Server"=dword:00000004

    ReplyDelete
  4. According to IE 9 – What’s Changed? on the HttpWatch blog, IE9 still has a 2 connection limit when over VPN.


    Using a VPN Still Clobbers IE 9 Performance

    We previously reported
    about the scaling back of the maximum
    number of concurrent connections in IE
    8 when your PC uses a VPN connection.
    This happened even if the browser
    traffic didn’t go over that
    connection.

    Unfortunately, IE 9 is affected by VPN
    connections in the same way:

    ReplyDelete
  5. I believe there is a maximum number of concurrent http requests that browsers will make to the same domain, which is in the order of 4-8 requests depending on the user's settings and browser.

    You could set up your requests to go to different domains, which may or may not be feasible. The Yahoo guys did a lot of research in this area, which you can read about (here). Remember that every new domain you add also requires a DNS lookup. The YSlow guys recommend between 2 and 4 domains to achieve a good compromise between parallel requests and DNS lookups, although this is focusing on the page's loading time, not subsequent AJAX requests.

    Can I ask why you want to make so many requests? There is good reasons for the browsers limiting the number of requests to the same domain. You will be better off bundling requests if possible.

    ReplyDelete
  6. Here's the list so far -- please help complete it!

    Number of concurrent requests of any type (including AJAX, image loads, etc) to a single domain:

    FF 2: 2
    FF 3: 6
    IE 6/7: 2
    IE 8: 2 on dialup, 6 on broadband
    Safari: ?
    Chrome: ?

    ReplyDelete

Post a Comment

Popular posts from this blog

[韓日関係] 首相含む大幅な内閣改造の可能性…早ければ来月10日ごろ=韓国

div not scrolling properly with slimScroll plugin

I am using the slimScroll plugin for jQuery by Piotr Rochala Which is a great plugin for nice scrollbars on most browsers but I am stuck because I am using it for a chat box and whenever the user appends new text to the boxit does scroll using the .scrollTop() method however the plugin's scrollbar doesnt scroll with it and when the user wants to look though the chat history it will start scrolling from near the top. I have made a quick demo of my situation http://jsfiddle.net/DY9CT/2/ Does anyone know how to solve this problem?

Why does this javascript based printing cause Safari to refresh the page?

The page I am working on has a javascript function executed to print parts of the page. For some reason, printing in Safari, causes the window to somehow update. I say somehow, because it does not really refresh as in reload the page, but rather it starts the "rendering" of the page from start, i.e. scroll to top, flash animations start from 0, and so forth. The effect is reproduced by this fiddle: http://jsfiddle.net/fYmnB/ Clicking the print button and finishing or cancelling a print in Safari causes the screen to "go white" for a sec, which in my real website manifests itself as something "like" a reload. While running print button with, let's say, Firefox, just opens and closes the print dialogue without affecting the fiddle page in any way. Is there something with my way of calling the browsers print method that causes this, or how can it be explained - and preferably, avoided? P.S.: On my real site the same occurs with Chrome. In the ex