Question

I have a problem with ajax requests. I need them to go independently not blocking each other.

The situation looks like this. I have first ajax request which takes about 1minute and multiple other requests which are almost instantaneous. The 1minute request blocks other requests from happening. I need a way around.

Edit:
Well I get a hanging process in firebug which normally ends in 200ms. The other problem is if I abort the request it still takes same time as if I didn't aborted. A bug or am I aborting it in a wrong manner?

Base concept is like this:

  1. load a store with onload event which has Ajax request to 60s script
  2. I click a button that triggers another Ajax request to 200ms script
  3. the second request waits for the first to end and then ends

I tried a different aproach also:

  1. load a store with onload event which has Ajax request to 60s script
  2. I click a button that triggers another Ajax request to 200ms script
  3. abort first Ajax request
    • as expected firebug shows the request was aborted
    • the second script still takes 60s+200ms to end

Any ideas?

Was it helpful?

Solution

It was a session problem. I opened the session for both scripts and first one locked the session file for the time of it's execution. Closing the session for one of the scripts solved the problem.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top