a jaundiced eye: stuck
for thursday, may 15, 1997. How to Kill Your Web Browser.
So I went to a page here at Jaundiced Eye which doesn't exist.
Ordinarily, this wouldn't be a problem, as the server would
simply generate a 404 Not Found error. What could be simpler?
However, JE is served from an
Apache server, which is capable
of
trapping errors, such as 404, and responding in less jarring
ways. I had configured JE's server to send back a certain page
whenever I got a 404 - the page explains that the URL is not
correct, and offers advice on how to find what you're looking
for. Real nice. I recommend it to anyone who wants to provide a
somewhat personalized experience for your fumble-fingered web
visitors.
In this case, however, I had used a frameset document for the
page which was returned. Since the 404 ErrorDocument is a rooted
URL, the server knows how to find the page it needs to send
back to the browser. Unfortunately, the browser is not sent a
HTTP Redirect, but is sent the contents of the file named in
the ErrorDocument config.
What this means is that if my ErrorDocument is defined thus:
But I went looking for
The kicker comes when the HREFs are not rooted, in other words,
when the anchors and FRAME SRCs look like this:
If you've been folowing along, you'll realize the problem.
The browser thinks it is dealing with /no/such/file.html.
It parses the frameset, and tries to fetch the file
/no/such/toc_error_body.html - which of course, doesn't
exist. Which generates another 404. Which sends back another
copy of the toc_error frameset document. Ever heard of
recursion?
I've seen Navigator crash before, but this was pretty spectacular.
BTW, it crashed on both Macintosh 3.* and Win95 3.* before I
figured out what the hell was causing it...
Thanks to the Web for the entertainment.
© 1997-2001
Steven Champeon. All rights reserved. |