Skip to page content or Skip to Accesskey List.

Work

Main Page Content

Netscape Linked Stylesheet Bug

Rated 4.08 (Ratings: 1)

Want more?

  • More articles in Code
 
Picture of Jeff Howden

Jeff Howden

Member info

User since: 14 Dec 1998

Articles written: 21

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.

Jeff Howden (.jeff) is a web developer working for Vos & Howden, LLC in Portland, Oregon where he's partnered with long-time colleague, Anthony Vos. His skills include ColdFusion, JavaScript, CSS, XML, relational databases, and much, much more. His biggest professional accomplishments include, but are not limited to:

  • building a ColdFusion-based e-commerce solution for Mt. Bachelor that transacted over $1.62 million dollars in September 2001 with 0 (yes, that's zero) ColdFusion errors and then an almost completely rebuilt version transacted $2.86 million dollars in September 2002.
  • being asked to be a Technical Editor for the ColdFusion MX book, Inside ColdFusion MX from New Rider's Publishing company.
  • being asked by BrainBench to perform quality control on their JavaScript 1.5 certification test after receiving the highest beta test score out of 200 testees.
  • managing the server that hosts evolt.org and withstanding a slashdotting that brought over 1,000,000 hits to the site, over 10 gigs of data transfer, and an average in excess of 2300 unique visitor sessions per hour, all within a 24-hour period and the server never hiccuping once.

The access keys for this page are: ALT (Control on a Mac) plus:

evolt.org Evolt.org is an all-volunteer resource for web developers made up of a discussion list, a browser archive, and member-submitted articles. This article is the property of its author, please do not redistribute or use elsewhere without checking with the author.