December 18, 2009

Bypass Friendly Internet Explorer 404 Messages

Filed under: ColdFusion, PHP — joel.cass @ 9:22 am

I had to build a custom 404 page today and was bashing my head against a wall regarding Internet Explorer’s friendly “The webpage cannot be found” error message page.

Well, according to this link, the solution is simple – the page has to be at least 512 bytes. Too easy.

Of course, you can simply just add 512 bytes of whitespace and/or reduce the amount of whitespace to 512 minus the original size of the page. If your page is greater than 512 bytes you have nothing to worry about.

The ColdFusion repeatString and PHP str_repeat methods would be useful for this.

No Comments »

No comments yet.

RSS feed for comments on this post. TrackBack URL

Leave a comment