Tag Archives: Firefox

Suprising things no one bothered to tell me about custom 404 pages

27 Sep

I thought that 404 pages, which indicates that no content was found at the specified address, are about the most trivial aspect of the web, turns out I was wrong. A couple of weeks ago  a client asked me to add a 404 page to his WordPress theme, and since I like to leave as much control as I can at the hands of the site owner (reduces my headaches) I had to figure out how to integrate it into WordPress, and today I read one of the Firefox developers mentioning that he works on how Firefox should handle 404 pages.

I was surprised to learn that internet explorer and chrome will simply ignore your custom 404 page if it is shorter than 512 bytes, assuming that such a small message was automatically generated by the server and do not contain any useful information to the user. Therefor, if your 4040 page is shorter than 512, you should add some HTML comments to it to make it bigger.

Somewhat less surprising, but very interesting, is an article in a list apart which suggests that the 404 page should be dynamic with different pages served in different 404 contexts.

BTW: most WordPress themes serves what should be 404 pages as a 200 (success) pages. My solution fell into this trap too :(

Firefox 3.5 do not respect the cache size setting – limits it to 8192 files

29 Aug

There is an urban legend about bill gates of microsoft saying in the old DOS days that 640KB of RAM should be enough for everybody. It seems like someone in the mozilla organization is thinking along the same lines of thought, and while you actually have an option to change the amount of disk space which can be used by caching, the practical limits are not a lot higher then the default of 50MB as firefox, as the real limiting factor on the usage of the cache is an obscure technical decision to limit the number of files in the cache to 8192, a limit which is reached very easily today with all the small javascripts and images you get from every site.

The relevant bug contains a very small patch which probably solves the problems, but for sure normal users will not be able to set up the build environment required to build firefox, and even most of the geeks will have trouble doing so. In any case no one really wants to fork firefox just because of this bug….

So what can be done until the high console of mozilla will decide to solve this bug? Install a caching proxy!. Unfortunatly I could not find a nice small one in 5 minutes search on the net. All I have found were ad blocking non-caching proxies which are not interesting in this context :(