jquery1.4+ Ajax IE8 memory leak problem _jquery

Source: Internet
Author: User
And the JQuery1.3.2 version does not exist, the jquery1.4+ version exists
By contrast, one of the differences between the two versions was eventually found
Jquery1.4+ adds a piece of code to the Ajax method to invoke the onReadyStateChange method when abort
Copy Code code as follows:

try {
var oldabort = Xhr.abort;
Xhr.abort = function () {
if (XHR) {
Oldabort.call (XHR);
}
onReadyStateChange ();
};
catch (e) {}


After investigation, it is this section of the assignment that produced an error
onReadyStateChange's readystate is 4, that is, when successful, will xhr.abort destroyed
Memory Leak resolution
Another: If the direct xhr.abort=null, do not know why under IE6 will be the error
Have to Try...catch, anyway IE6 not fix error and no problem

The cause of the problem is unknown in the IE8
Could it be that Xhr.abort and Oldabort produced a closure?
But why IE6 not leak?
Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.