Ok, I got curious and worked up a test to make sure the abort method worked.. It does, but it's behavior is different in every browser I've tried which is IE6, IE7, FF2 and Opera 9.1. Please try this page in any other browsers that you have access to and let me know how it works, specifically Safari. Also, I probably need to play with timeouts or loops to check the status to see how aborting works at different stages of the request but I hav ea feeling it'll work the same for all.
http://colin.mollenhour.com/ajaxtest.php I think it would be quite possible to add an abort method to Prototype's Ajax classes. So far, I think all that is really needed to make it work consistently cross browser is something like the following: req.onreadystatechange = function () { debug('readyState ('+req.readyState+')'); if(req.readyState != 4){ return; } try{ if(req.status == 0){ debug('aborted with status == 0'); return; } }catch(ex){ debug('aborted on exception checking status'); return; } callback(req); } I imagine aborting all of your outstanding Ajax requests on unload would fix your problem. You can use my page as a base for devising your own tests to that purpose and let us know how it goes. Thanks, Colin szaroubi wrote: > Hello, > I am new to the list. I am currently using prototype.js version > 1.4.0, for an application we are developing to be used with IE6&7. > I am having a problem which can be triggered as so: > > 1) Open Window with 10 Ajax Request connections starting on Load > 2) Right after the page loads (and you feel like the Ajax Requests > have been triggered) close the window > 3) Repeat steps 1 & 2 about 3~4 times > 4) All other Ajax Requests within IE session will not work (I used > a network scanner to sniff the packets on my network and see that the > Ajax Requests are not even sending a request) > > > The problem happens with both IE6 and IE7. Upgrading to 1.5.0 is > not really an option as we have found other problem in 1.5.0 which > break under IE7. > The problem seams to be a "connection leak" or "dangling > connection" problem in IE (connections are not being closed correctly > and IE thinks that they are still open). > > Has anyone seen a problem like that? Does anyone have an idea where > I can look? Possible work around (Setting a reg key to increase the > number of allowed connections in IE (even if it's just a not very > robust workaround)) ? > > Any help would be appreciated. > Thank you for your time > > > > > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Spinoffs" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---
