title: XHR Request on Mobile Safari returns nothing
body: <p>I'm having an issue with performing an XMLHttpRequest in mobile safari (iOS 8.3).</p>
  
  <pre><code>var ajax_request = function(){
  
      this.get = function( url, callback ){
  
          var r = new XMLHttpRequest();
  
  
          r.open( 'GET', url, true );
          r.onload = function (data) {
              console.log(data);
              if ( r.status &gt;= 200 &amp;&amp; r.status &lt; 400 ) {
                  callback(r);
              } else {
                  console.log("An error occured");
              }
          };
          r.onerror = function (err, url, lineNumber) {
              console.log("A connection error occured");
              console.log(err);
              console.log(lineNumber);
          };
  
          r.send();
  
      }
  
  };
  </code></pre>
  
  <p>This code is making a request to an asset in Shopify.</p>
  
  <p>In all browsers I have tested, the request works perfectly fine, however in Mobile Safari, I receive a completely empty response.</p>
  
  <p>Shopify returns with the Access-Control-Allow-Origin * header set so I'm doubtful that it's related to CORS but perhaps I'm missing something.</p>
  
  <p>Additionally, this code has been running on a production site for some time and the error has recently begun occurring which makes me think it's either a bug in a safari update or a change in the way Shopify handles AJAX requests.</p>
  
  <p>Any light anyone could shed on this issue would be hugely appreciated.</p>
  
  <p><strong>Desktop Safari: (8.0.6)</strong></p>
  
  <p><img src="https://i.stack.imgur.com/1AxeR.png" alt="enter image description here"></p>
  
  <p><strong>Mobile Safari:</strong></p>
  
  <p><img src="https://i.stack.imgur.com/DTUuH.png" alt="Screenshot of response in Mobile Safari"></p>