When I request this URL:
http://www.w3.org/TR/html5/embedded-content-1.html#the-img-element
the server responds with a 404 (File not found) HTTP-response. However, a few moments later a different URL is loaded into the browser, namely:
http://www.w3.org/TR/html5/the-img-element.html#the-img-element
The server basically sends a second HTTP-response whose URL is different from the URL that was originally requested.

How is this "redirect" possible? The first HTTP-response was a 404, not a 3xx. Afaik, 404 responses do not 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?
See for yourself: 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).
:)Refresh: 5;url=new_url.htmlheader would also work.404page that is returned here is generic, so they can't hard-code the specific new URL like that. What they do instead is, have a huge JavaScript file with all the URL mappings. This file is loaded by the404page, and then performs the corresponding redirect.Refreshheader, when you can return a301(Moved permanently) response:). They decided to do it with JavaScript, but if they had decided to do it on the server-side, they would have implemented it via a301redirect, not via aRefreshheader, I think.