I'm using prototype as my ajax framework. If that can't handle simultaneous ajax requests then I need to know about it as my code relies on it! I've posted a question to the prototype discussion group.
I think you have led me in the rigth direction as I've since read that IE and Firefox can handle only 2 concurrent connections to the same server and any more get queued.
Many thanks for your help.
Main Topics
Browse All Topics





by: Hube02Posted on 2008-12-13 at 08:51:44ID: 23164522
In reality, depending on how you make the requests and the system involved, in many cases the second request will cancel the first request and you may only get the response from the first request. This is dependent on how the JavaScript code that makes the request is created.
p and inspect the code to see how I accomplish this. This may not be the solution you are looking for, but it may lead you in the right direction.
There are some frameworks out there that will process multiple simultaneous AJAX requests, though I don't know them off the top of my head.
What is required is to wrap the functions inside other functions, which I believe are called closures. In a way you create a class, or a pseudo class.
I have created my own ajax class that I use for simple things, when I don't want to install an entire framework just to use a little AJAX. You can download this script at http://w3teck.com/hajax.ph