Multiple Ajax requests for same URL

后端 未结 2 1099
梦谈多话
梦谈多话 2020-11-30 11:56

I make asynchronous call for same URL for multiple times, But the response came as sequentially. Please see the attached image, The request has been started only after first

相关标签:
2条回答
  • 2020-11-30 12:28

    Necko's cache can only handle one writer per cache entry. So if you make multiple requests for the same URL, the first one will open the cache entry for writing and the later ones will block on the cache entry open until the first one finishes. There's work ongoing to rearchitect the cache to remove this restriction.

    0 讨论(0)
  • 2020-11-30 12:37

    Generally browsers will have a limit to how many concurrent requests they will serve to a particular hostname, in the old days this was 2, but most browsers have now raised this. Defining a proxy can also affect these limits in some browsers. Again these are enforced client-side. However it should be more than one in any case. It may be possible that Firebug is also reducing the limit, check about about:config for concurrent configurations.

    Are you sure you are not waiting until the callback is executed before launching the next request as given you only have one I suspect this what is really happening?

    0 讨论(0)
提交回复
热议问题