Skip to content
This repository was archived by the owner on Jul 13, 2020. It is now read-only.

Fix IE8/IE9 bug that may cause hanging cross-domain requests. #224

Merged
merged 1 commit into from
Sep 29, 2014
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion src/system.js
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,10 @@
xhr.onload = load;
xhr.onerror = error;
xhr.ontimeout = error;
// IE8/IE9 bug may hang requests unless all properties are defined.
// See: http://stackoverflow.com/a/9928073/3949247
xhr.onprogress = function() {};
xhr.timeout = 0;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we need this as well? According to http://msdn.microsoft.com/en-us/library/ie/cc304105(v=vs.85).aspx it will default to 0 anyway?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I didn't need timeout it for my particular case. But after reading other people's posts on this bug, there was one person who claimed they needed the timeout also. I thought it safest to just include it. Sorry I don't have the URL handy.

}
function load() {
fulfill(xhr.responseText);
Expand Down Expand Up @@ -286,4 +290,4 @@
if (curScript.getAttribute('data-init'))
window[curScript.getAttribute('data-init')]();
}
})();
})();