Apparently Firefox 2 is ignoring any style sheets that web site authors may have specified in their web feeds (RSS/Atom). It took me a few hours of idle contemplation to decide how I felt about it, so here goes.

The bug is that Firefox ignores any <?xml-stylesheet?> directive in RSS/Atom XML documents and formats the web feed representation using a default style chosen by Mozilla.

Phil Ringalda describes the workaround of padding the beginning of your XML document with a really really long comment, because Firefox's sniffer gives up if it doesn't find a <feed> or <rss> string within the first 512 characters. To be fair, Microsoft's Internet Explorer 7 also does the same thing, which is one argument that Mozilla folks are using to justify the behavior.

There is a long and heated discussion over at mozilla.dev.apps.firefox about this right now. Mark Pilgrim stormed out after strongly disagreeing with the decision of the benevolent dictator.


On the one hand, web authors are screaming that Firefox should try to style their documents as they (the author) intended and that the workaround (hack) smacks of Web 1.0 days during the First Browser War where browser makers assumed they knew better than web authors.

On the other hand, the usability gurus are arguing that it is very important for everyone to "get" web feeds as a technology, including your Grandma. This means that a consistent visual representation of feeds (including subscription options) is very important and that the bulk of the stylesheets out there render the feed in a less than useful fashion. Others within Mozilla are arguing that IE7 and Google Reader also hi-jack the visual representation of web feeds, so why is everyone picking on Firefox?

These are all very good arguments, in fact, I can see both sides of the story. But I think it was this comment that finally pushed my opinion that Mozilla (and Microsoft) are in the wrong here. Here are my justifications:

  • It looks like if IE7 and Fx2 encounters an unknown XML stream that has a root node of <feed> or <rss>, then they assume the content type is Atom/RSS and proceed to style it as they do all web feed content. This is clearly wrong and should be considered a bug because other XML grammars may use <feed>/<rss> as their root node and will be forced to be displayed as if the content is a web feed, a clear error.
  • A consistent visualization is important, but what if Firefox decided that all HTML links must be blue, underlined and in 12-pt Arial font while all other text must be black, 10-pt Arial? This certainly would help Grandma realize where the clickable links are, but on the other hand if the technology supports more flexibility and the application can already handle the flexibility then overriding this behavior is stifling creativity and frustrating web authors. And yes, I know there at least an order of magnitude between 'those who understand what a link is' and 'those who understand what a feed is', but the fact of the matter is that styling is here now - once Pandora's box is opened, you can't close it.
  • From reading the comments in both the bug report and the newsgroup discussion, it sounds like this change in behavior from Firefox 1.5 to 2.0 broke some web sites. In general, I'm not too worried about breaking web sites if it's to clean up a standards compatibility issue or because of a well-used hack that no longer applies. But in this case, the behavior change is actually quite unexpected from a reasonable developer's point of view ("Firefox can style content using stylesheets. Here is my stylesheet, display my content the way I want!"). From their point of view, the developer followed the rules and got the shaft.


Mozilla and Microsoft should be encouraging web authors to keep their feeds unstyled for the purposes of mainstream adoption, but they should not be forcing the web authors hands. I also think for author-styled web feeds, the browsers should keep the "subscribe" button in the chrome (I'd even agree with the proposal of a tiny floating div at the top of the page), while unstyled web feeds continue to get the default visual representation that Firefox 2 and IE7 do now. Most web authors should realize that there are inherent benefits of letting the next generation browsers consistently display web feeds now that Grandmas everywhere will be subscribing to feeds all willy-nilly-like.

And the browsers should most definitely NOT be styling content that they don't know is RSS/Atom (as told by the web server). Please, no more magic strings...

§296 · November 28, 2006 · Firefox, Microsoft, Software, Technology, Web, XML · Tags: , · [Print]

Comments are closed.