Problems aborting requests in IE
0 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Jacob_Metcalfe
Posted On:   Sunday, August 13, 2006 09:14 AM

I have an app that makes a series of AJAX requests whenever it wants to update the status of one of the elements on the page. This could be 1 request every now and then or 20 odd going off at the same time - And because of the complexity of the backend it tends to take about 5 seconds to get a response. No problems there - but when quitting the page I get a large lag in IE while it waits for the completion of the old requests. I use something along the following lines in my unload script: for(var i=0; i req[i].abort(); req[i] = null; } req = []; Firefox handles this fine. In IE however it runs the unload scrip   More>>

I have an app that makes a series of AJAX requests whenever it wants to update the status of one of the elements on the page. This could be 1 request every now and then or 20 odd going off at the same time - And because of the complexity of the backend it tends to take about 5 seconds to get a response.



No problems there - but when quitting the page I get a large lag in IE while it waits for the completion of the old requests. I use something along the following lines in my unload script:


			
for(var i=0; i



req[i].abort();

req[i] = null;



}



req = [];




Firefox handles this fine. In IE however it runs the unload script - running abort on all the requests - But then still waits for them to complete before making any new requests. This causes a significant delay in my other pages.



If anyone has an idea of a way to stop IE waiting on these old calls Id be v grateful.



Thanks    <<Less
About | Sitemap | Contact