[ Team LiB ] |
Recipe 9.6 Making Internet Explorer Display Your Error PageProblemYou have an ErrorDocument correctly configured, but IE is displaying its own error page, rather than yours. SolutionMake the error document bigger—at least 512 bytes. DiscussionYes, this seems a little bizarre, and it is. In this case, Internet Explorer thinks it knows better than the web site administrator. If the error document is smaller than 512 bytes, it will display its internal error message page, rather than your custom error page, whenever it receives a 400 or 500 series status code. This size is actually configurable in the browser, so this number may in fact vary from one client to another. "Friendly error messages" can also be turned off entirely in the browser preferences. This can be extremely frustrating the first time you see it happen, because you just know you have it configured correctly and it seems to work in your other browsers. Furthermore, when some helpful person tells you that your error document just needs to be a little larger, it's natural to think that he is playing a little prank on you, because this seems a little too far-fetched. But it's true. Make the page bigger. It needs to be at least 512 bytes, or IE will ignore it and gleefully display its own "friendly" error message instead. Exactly what you fill this space with is unimportant. You can, for example, just bulk it up with comments. For example, repeating the following comment 6 times would be sufficient to push you over that minimum file size: <!-- message-obscuring clients are an abomination and an insult to the user's intelligence --> See Also |
[ Team LiB ] |