views:

78

answers:

1

I have a ASP.NET Web App. I notice that while a simple ajax call(see below) is in process, web application does not respond to any action that I try on a different browser.

$.ajax({
        type: "GET",
        async: true,
        url: "someurl",
        dataType: "text",
        cache: false,
        success: function(msg){
            CheckResponse(msg);
        }
    });

This happens when I open two firefox or two IE. I run the function that does the ajax call on first browser and till the response of the ajax is returned, I cannot do anything on the second browser on the same site. No breakpoints are hit on the server from the second browser till initial ajax is completed. It hangs for any click etc..

The hang on the second browser ends immediately after the ajax call is completed on the first one.

This behavior is not observed if I try the same on IE and Firefox side by side. Only happen with IE & IE or FF & FF side by side

Appreciate if you can help me see what I am missing here.

+1  A: 

It sounds like Apache (or whatever webserver you have running) only processes one request per client at a time. When processing your Ajax request, Apache queues all other requests coming from the same client.

Also, when using two different browsers, your server sees each browser as a different client, meaning it will process one request per browser. I don't know exactly what information is used to identify a client (my guess would be IP address + browser version, but I could be horribly wrong here)

Someone else might be able to tell you how to configure Apache to work around this problem; unfortunately I don't know this myself. The problem does not lie with Javascript / Ajax however; it is a limitation imposed by the server, not the client.

Duroth
This seems *highly* unlikely to me.
Pointy
@Pointy: This is exactly what happened on an older development server I used. The server, for whatever reason, refused to simultaneously process more than one request from any client. Highly annoying when you're writing massive export scripts that can take over 5 minutes to run. "No breakpoints are hit on the server from the second browser till initial ajax is completed. It hangs for any click etc.." is what tells me that the browser does not freeze or hang, it it simply waiting for a response from the server.
Duroth