title: Yii2 jQuery not working in IE11
body: <h1>The Problem</h1>
  
  <p>I'm trying to create a page that updates a specific records field in a table when a checkbox is clicked (ideally without refreshing the page). I thought jQuery/AJAX would work for me.<br />
  Apparently not.</p>
  
  <p>I've been struggling with this for a while, so I decided to scale it back and really simplify it to figure out what's not working. The updating of the table is fine (from Chrome), the not-refreshing isn't. And none of it works from IE11.</p>
  
  <p>It's currently hosted on my local machine, so part of me is wondering if that's got something to do with it, however jQuery works fine on other sites I have hosted in the same way.</p>
  
  <p></p>
  
  <p><strong>The Yii2 controller action</strong>:</p>
  
  <pre><code>public function actionTest() {
      return 'This is just a static test';
  }
  </code></pre>
  
  <p><strong>The (very basic) php page</strong>:
  This is the source after the page has been rendered</p>
  
  <pre><code>&lt;script src="/assets/ddb27309/jquery.js"&gt;&lt;/script&gt;
  &lt;script src="/assets/eeb0e590/yii.js"&gt;&lt;/script&gt;
  
  &lt;div id="loadToMe"&gt; &lt;/div&gt;
  
  &lt;script type="text/javascript"&gt;
      $(document).ready( function() {
          $('#loadToMe').load('/mycontroller/testing');
      });
  &lt;/script&gt;
  </code></pre>
  
  <p>Now normally I'd expect the currently empty div to be populated with the string <code>This is just a static test</code> - nice and easy.</p>
  
  <p>However.</p>
  
  <p><strong>Chrome &amp; FireFox:</strong> Redirect to {mysite}/mycontroller/testing and shows the given text.</p>
  
  <p><strong>IE 11:</strong> gives me the following error message, but nothing else happens:</p>
  
  <pre><code>XMLHttpRequest: Network Error 0x2f76, Could not complete the operation due to error 00002f76.
  </code></pre>
  
  <p>This behaviour is identical for both browsers when I use <code>$.get</code>, <code>$.post</code> and <code>$.ajax</code> (with their various syntax differences) with one exception - IE11 gives a different error message for a POST.</p>
  
  <pre><code>XMLHttpRequest: Network Error 0x800c0008, The download of the specified resource has failed.
  </code></pre>
  
  <p>I've tried various things from various sources, including (but not limited to - I can't remember everything I've tried) the following:</p>
  
  <pre><code>&lt;meta http-equiv="X-UA-Compatible" content="IE=EmulateIE9" /&gt;
  
  &lt;meta http-equiv="X-UA-Compatible" content="IE=edge;chrome=1" /&gt;
  
  AddDefaultCharset utf-8
  </code></pre>
  
  <p>And using the network tab from IE developer tools I have this for a POST and a GET respectively.</p>
  
  <pre><code>Protocol    Method  Result      Type        Received    Taken   Initiator       Wait    Start   Request Response    Cache read  Gap‎‎
  HTTP        POST    302         text/html   464 B       47 ms   XMLHttpRequest  0       16      0       31          0           2902
  HTTP                (Aborted)   text/html   506 B       &lt; 1 ms  XMLHttpRequest  2902    0       0       0           0           47
  </code></pre>
  
  <p>The linked js files are ones that came from Yii2 (and are the minimum required in order for the <code>$.load</code> to work in Chrome) - I have not touched them in any way.</p>
  
  <p>jQuery version is v2.1.3<br />
  Yii2 version is v2.0.3</p>