Main Page Content
Netscape Linked Stylesheet Bug
You're excited to be a web designer and you decide it's finally time to start using style sheets. You surf around the net checking out all the various reference material and tutorials and viewing the source on any site you suspect is using them. You decide that ease of maintenance is one of the most important advantages of styles sheets to you, so you decide to use a linked style sheet. Using your prior knowledge of how to link to items and your new-found knowledge about linking a stylesheet, you come up with the following tag:
<LINK REL=STYLESHEET HREF="library/global.css" TYPE="text/css">
As you're building the site, you make sure to always use the link to the stylesheet and change it for a particular document so it always works.
One day you get an e-mail from a visitor to your site politing informing you that one of your links results in a 404 error. That's odd, you think to yourself, I check those links all the time. So, diligently, you go back through the site, combing it for bad links, but find nothing. You e-mail the visitor and ask them if they're sure about the link they mentioned as being incorrect. You request all the obvious system info to help you find the problem. Among a bunch of other important info, they tell you they are using Netscape Navigator 4. Since you checked for all the bad links in Internet Explorer 5, you decide maybe you should try it in Netscape to see if you can replicate the problem. You check the link that is supposed to be responsible for the problem and sure enough, 404 error. You check, double-check, even triple-check that link and it's correct. What could be causing the problem? After many hours of careful scrutiny, you discover that you mistyped the link for the stylesheet, and the path contains a misspelling.
<LINK REL=STYLESHEET HREF="library/glabol.css" TYPE="text/css">
The problem is fixed, but let's review why it does that.
Netscape Navigator 4 has a little known bug in it that causes it to not display the page with a bad linked stylesheet, but instead request the linked stylesheet as a separate document, causing a 404 error. So, take this as a lesson when using linked stylesheets. Always check that your links are correct. If there are reports of 404's, check that the link to the stylesheet is correct if the link works for you. It could save you a ton of time.