title: jQuery Ajax success/error callbacks not firing in IE
body: <p>I've been trying to get ajax calls to work properly in IE9. I can see in the network data that the request goes through fine. And the jqXHR object being returned by the jQuery $.ajax() call contains the response data. Yet, my success / error / complete callbacks are not firing. Here's the code...</p>
  
  <p>At the top of my script:</p>
  
  <pre><code>// override xhr for browser that use XDR
  if ('XDomainRequest' in window &amp;&amp; window.XDomainRequest !== null) {
  
    // override default jQuery transport for IE
    jQuery.ajaxSettings.xhr = function() {
        try { return new XDomainRequest(); }
        catch(e) {
          console.log('test'); 
        }
    };
  
    // Maybe a 304 response is causing the callbacks not to fire?
    // This makes sure I'm getting 200
    jQuery.ajaxSettings.cache = false;
  
    // also, override the support check
    jQuery.support.cors = true;
  }
  </code></pre>
  
  <p>Then my ajax call... Pretty plain.</p>
  
  <pre><code>$.ajax({
      url: url,
      success: success,
      complete: complete,
      beforeSend: beforeSend,
      error: error
  });
  
  function success(response, textStatus, jqXHR){
      console.log('success');
      if( typeof fn == 'function'){
          fn(response.data);
      } else {
          console.log('Invalid callback supplied for dataGateway');
      }
  }
  
  function error(jqXHR, textStatus, errorThrown){
      console.log("Could not retrieve data from API.");
      return;
  }
  
  function complete(jqXHR, textStatus){
      console.log('complete');
  }
  
  // This is the only callback that gets fired
  function beforeSend(jqXHR, settings){
      console.log('before send');
  }
  </code></pre>
  
  <p>Does anybody know how to troubleshoot this?</p>