title: javascript window.open infinite loading
body: <p>I have a JQuery ajax request that can return error status and messages.</p>
  
  <p>To handle them I use this code :</p>
  
  <pre><code>$.ajax("url", {
      options: options
  }).done(function(text, statusText, data) {
      //Manage data
  }).fail(function(data) {
      //Manage fail
  });
  </code></pre>
  
  <p>In the fail handle I want, in case of <code>500: internal server error</code>, to open a new tab with the response text (for debug purposes)</p>
  
  <p>I do it this way :</p>
  
  <pre><code>if (data.status === 500) {
      var w = window.open("App error", "blank");
      w.document.write(data.responseText);
  }
  </code></pre>
  
  <p>And it works !<br>
  Except one point : my browser loads the page, the content is displayed (and as it's static content all of this is not a real problem), <strong>but</strong> the tab is marked as loading... Loading... Loading...</p>
  
  <p>I'm using Firefox 63.0(64bits).</p>
  
  <p>Does anyone know where this comes from ? It's not really annoying, it's just a (fun ?) behavior I don't understand.</p>
  
  <p><a href="http://jsfiddle.net/rbzd8uv6/" rel="nofollow noreferrer">Here is a fiddle on which I get the exact same behavior.</a></p>