Skip to main content

Bug Tracker

Side navigation

#6298 closed bug (fixed)

Opened March 16, 2010 05:07PM UTC

Closed September 28, 2010 10:01PM UTC

Last modified March 14, 2012 01:19AM UTC

IE7,IE8 throw exception on new window.XMLHttpRequest();

Reported by: name5566 Owned by: john
Priority: high Milestone: 1.4.3
Component: ajax Version: 1.4.2
Keywords: IE7,IE8,xhr,XMLHttpRequest exception Cc:
Blocked by: Blocking:

Microsoft failed to properly implement the XMLHttpRequest in IE7 and IE8.

Test Case:





<script src="js/jquery/jquery-1.4.2.js" type="text/javascript" charset="utf-8"></script>

<meta http-equiv="content-type" content="text/html; charset=utf-8">


<script type="text/javascript" charset="utf-8">

$(function() {

$('a').click(function() {


return false;







<a href="register.html">Here</a>



Open the IE8 or IE7 and then click the link(register.html)

if you open the page, don't reload the page, and click the link at the first time.

IE7 window.XMLHttpRequest will throw a exception: Permission Denied

IE8 window.XMLHttpRequest will throw a exception: Object don't support this property or method

if you reload the page, and click, on exception throw.

I try to fix it:

xhr:function() { return window.ActiveXObject ? new ActiveXObject("Microsoft.XMLHTTP") : new XMLHttpRequest(); },

it be well.

Attachments (1)
  • index.html (0.6 KB) - added by name5566 March 16, 2010 05:07PM UTC.

    use case

Change History (6)

Changed May 22, 2010 03:12PM UTC by Bradley comment:1

#6480 and #6586 are duplicates. See #6586 for more info and additional test case.

Changed September 02, 2010 04:43PM UTC by dmethvin comment:2

Note that the user (or in a company, the admin with the IEAK) has the ability to disable the "native" XMLHttpRequest object introduced starting in IE7. If you are encountering situations where the native object no longer works, check IE Tools, Internet Options, Advanced, Security, "Enable native XMLHTTP support."

There doesn't appear to be any way to tell when XHR has been disabled, and the document.XMLHttpRequest check still succeeds in IE even though it's disabled.

Changed September 28, 2010 08:05PM UTC by snover comment:3

need: PatchCommit
owner: → john
priority: → undecided

#7094 is a duplicate of this bug.


Changed September 28, 2010 08:08PM UTC by snover comment:4

priority: undecidedhigh

#6728 is a duplicate of this bug.

Changed September 28, 2010 10:01PM UTC by john comment:5

resolution: → fixed
status: newclosed

Changed October 21, 2010 07:28PM UTC by Bradley comment:6

#6333 is a duplicate of this ticket.