Skip to content


Custom error pages on Internet Explorer

Being a web developer I am often faced with the challenge of getting a website looking sweet in various types of browsers and versions of those browsers.

Firefox

Each browser interprets code differently, so when one writes code which renders correctly in one browser it doesn’t necessarily render as well in another browser. The thorn in all web developer’s sides is good old Internet Explorer 6 or IE6. One can build a webpage which looks fantastic in the world’s best browser Firefox (yes I am biased 🙂 ) and then look at it in IE6 and it will most probably have layout issues.

There are numerous tricks and hacks to get web-pages looking good in IE6, so one just learns to deal with how bad the browser is.

So, what’s the real issue?

Just to re-enforce how bad the browser actually is, I was recently told about how Internet Explorer (all versions) have a built in default error page which will always be displayed even if you have added a customized error page to your web project.

What it boils down to is that if your custom error page is less than 512 bytes, it will never be rendered in IE. I seriously could not believe it when I saw the article by Jeff Starr, but it’s true. So, some Microsoft employee specifically wrote code to do this…one has to ask why? I mean seriously, what was the logic behind this decision? What a bunch of jokers!!!

To make matters worse, there even settings for this in the Windoze registry which differ according to the type of error….craziness!!

\HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Internet Explorer\Main\ErrorThresholds
Error - threshold (default)
400 - 512 bytes
403 - 256 bytes
404 - 512 bytes
405 - 256 bytes
406 - 512 bytes
408 - 512 bytes
409 - 512 bytes
410 - 256 bytes
500 - 512 bytes
501 - 512 bytes
505 - 512 bytes

Useless tip of the day: Ensure that your custom error pages have enough useless content in them to make them larger than 512 bytes

Tags: , , .

2 Responses

Stay in touch with the conversation, subscribe to the RSS feed for comments on this post.

  1. why don’t you just close the H1?

    (that’s a tag)

  2. Stephen Blake said

    Thanks for your pearls of wisdom Nils!

Some HTML is OK

(required)

(required, but never shared)

or, reply to this post via trackback.