How do I suppress "friendly error messages" in Internet Explorer?

Viewed 13789

I want to display a custom error page:

<!doctype html>
<html>
<head><title>400 Bad Request</title></head>
<body><h1>400 Bad Request</h1>
The grob must be in the frobber.
</body>
</html>

Unfortunately, Internet Explorer ignores the response sent by the HTTP server; hiding my page and showing their own:

Generic "This webpage cannot be found" IE error message

How can I convince Internet Explorer to show the page the user was sent?

Edit Chrome began doing the same thing in 2008. People have asked for it to be fixed; but it's marked as won't fix.

And you can fix it using the same trick in the answer.

1 Answers
Related