xmlHtt prequest中止()方法不会关闭Internet Explorer中的连接方法、prequest、xmlHtt、Internet

2023-09-11 01:19:32 作者:悲哀寸步不离

我有多个 xmlHtt prequest 在我的网页,而我试图调用中止()对他们所有的方法。在FF的伟大工程。 IE浏览器,在另一方面不会做缝补的事情。该连接不关门,我无法浏览到另一个页面,直到完成请求。这是什么?为什么没有IE浏览器关闭连接时中止()被称为?

I have multiple xmlHttpRequest on my page, and I am attempting to call the abort() method on them all. Works great in FF. IE, on the other hand does not do a darn thing. The connections do not close, and I am unable to navigate to another page until the requests complete. What is this? Why doesn't IE close the connections when abort() is called?

推荐答案

我几乎从来没有得到中止在IE工作。我累了,不记得为什么 - 这是有关无法中止,直到你在readyState的4(或者它改成的readyState 4时中止?)。无论哪种方式,Ajaxian的在其档案深处周围的工作:

I've almost never gotten abort to work in IE. I'm tired and can't remember why - something about not being able to abort until you're in readyState 4 (or maybe that it changed to readyState 4 when it aborts?). Either way, Ajaxian has a work around in the depths of its' archives:

http://ajaxian.com/archives/reusing-xmlhttprequest且不中止