Avoiding Custom Internet Explorer Error Pages

A bit more of a short and to the point comment rather than an actual article.

Various web browsers used to display a “helpful” page saying “something is broken” when a website responded with a HTTP 4xx or 5xx error response. At a time when those pages were frequently the apache default error page these custom pages were still not a very good idea, but these days useful information is frequently included in error pages (in particular for errors like 410 Gone).

Most browsers have switched to showing the actual error page sent by the web server, but Internet Explorer keeps a version of this custom error page alive. Fortunately there’s a work-around which is that Internet Explorer does this with a silent switch when the error page has at least 512 bytes in the initial response (ie not including any linked content like scripts, styles and images).

The upshot of this is that these pages will display a custom error page on Internet Explorer:

While these pages should display the actual error pages:

References:

Leave a Reply

Your email address will not be published. Required fields are marked *