title: How does this HTTP "redirect" work?
body: <p>When I request this URL:</p>
  
  <pre><code>http://www.w3.org/TR/html5/embedded-content-1.html#the-img-element
  </code></pre>
  
  <p>the server responds with a <code>404</code> (File not found) HTTP-response. However, a few moments later a <strong>different URL</strong> is loaded into the browser, namely:</p>
  
  <pre><code>http://www.w3.org/TR/html5/the-img-element.html#the-img-element
  </code></pre>
  
  <p>The server basically sends a <strong>second HTTP-response</strong> whose URL is different from the URL that was originally requested. </p>
  
  <p><img src="https://i.stack.imgur.com/w9FRy.png" alt="enter image description here"></p>
  
  <p>How is this "redirect" possible? The first HTTP-response was a <code>404</code>, not a <code>3xx</code>. Afaik, <code>404</code> responses do <em>not</em> trigger a second HTTP-request by the browser. So, does the server just push the second response without any request being made? If yes, why does the browser allow that?</p>
  
  <hr>
  
  <p><strong>See for yourself:</strong> Open the "Net" tab of Chrome's dev tools, and make sure that the "Preserve Log upon Navigation" flag is activated. Now, load the first URL (from above).</p>