The Inside Track on Firefox Development.

« Personal Blog | Main | Trademark Clarification »

September 12, 2006

Hi Mark

Hi Mark. (You know who you are).

Did you file a bug?

Wow, the feed UI is looking especially ugly right now. The button/widget alignment is wacky, the subscribe button no longer has emphasis, etc.

As for sniffing, what would you propose we do? (Hint: don't say "respect specified content type")

Posted by ben at September 12, 2006 9:25 AM

Comments

I'm not Mark, but I'd go with "if you can't get even a valid header or a single valid item out of the feed with any data in it, perhaps it's not a feed"

Posted by: Stuart Ballard at September 12, 2006 11:11 AM

IE7 sniffs it as a feed as well, fwiw.

Posted by: Robert Sayre at September 12, 2006 12:06 PM

Perhaps you could start by checking whether it's well-formed XML? I hear some people care about that sort of thing. I've even seen Bugzilla bugs about it.

I am sympathetic to the party line, it's a minority browser, we have to keep up with the Joneses, etc. But content sniffing is a particularly evil form of paternalism -- you are, in essence, saying that you are smarter than the web author. Which can be OK in some cases, if you actually *are* smarter than the web author. In this case, you're not.

Posted by: Mark at September 12, 2006 1:25 PM

> Perhaps you could start by checking whether it's
> well-formed XML? I hear some people care about
> that sort of thing. I've even seen Bugzilla bugs
> about it.

We process SAX events up to the first fatal error, and set a bozo bit.

File a bug.

Posted by: Robert Sayre at September 12, 2006 1:34 PM

> File a bug.

If I had filed a bug in the first place, would it have lasted longer than 15 seconds before being marked WONTFIX? Be honest.

Posted by: Mark at September 12, 2006 3:20 PM

I am not sure the result you are after will be practical, but we have made the effort for other things already.

For example, the planet.mozilla.org FOAF file is misdetected as RSS. When the parser comes up empty-handed, we load the page as plain XML. Random RDF files could fool the parser if they contain a channel node, but then there's an argument that we have a feed in that case.

The result we get now is not good: an error message would be welcome at the very least. Mozilla, like all web browsers, is full of sniffers. It takes years to get them perfected. For example, the page in your older entry now renders correctly in Safari. I doubt that's because they've turned off their sniffing code.

If a PHP template source for an Atom feed is the worst you can find, we're doing ok.

Posted by: Robert Sayre at September 12, 2006 3:58 PM

Have you considered contacting the IE team and your buddies over at Opera and Apple and trying to hash out an agreement to not use browser sniffing? If all the browsers have the same behavior, no one has a competitive advantage and feed providers have an incentive to use the proper content type.

I don't think this is a pipe dream. It could happen if the browser implementors would grow a little back bone and do what's best for the web. This defeatist, "there's nothing we can do about it" attitude just guarantees that nothing will ever change.

Posted by: wg at September 12, 2006 5:43 PM

The problem with feeds is that a large percentage (most than half, last I checked) have the wrong content type and that all the non-browser feed readers effectively sniff (by assuming _everything_ they're given is a feed), so that's not going to change. :( Sadly, browsers got into the feed space far too late to be able to enforce content types. Again, thank the non-browser feed vendors.

Posted by: Boris at September 12, 2006 7:09 PM

About content-sniffing.

No silent recovering mode is sometimes helpful for more than one person.

1. yes check that everything is well-formed.
2. Check if the content-type is the right one.
3. If not, here comes an opportunity for the community to fix.
- Warn the user that the browser might have difficulties to process it,
- Propose the user to write to the feed owner when the email address is available (social pressure)


Saying Content-Type is broken and then sniffing, just move the problem a little bit further but do not fix the issue.

@Boris: Do you have stats somewhere? Did you publish them? Are there big platforms?

I'm asking these questions because it's easier to engage a dialog with a platform which produces 1 million of feeds than every individual users.

btw: Mozilla in the past has *forced* people to put the right content-type for their stylesheet and stop using text/plain.

Posted by: karl at September 12, 2006 7:29 PM

Hey Ben, check out a nightly, the widget layout issues have been addressed :)

Posted by: beltzner at September 12, 2006 7:49 PM

@Boris

I understand that feed readers already do sniffing. If the browser vendors stop sniffing it certainly won't *force* feed providers to fix their content type. But it will provide an incentive to do so.

With the release of IE7, feed handling will now be considered a standard web browser feature. In the future, when web sites add feeds to their sites I believe that one of the first things they will do is fire up their browser and see if [IE/Firefox/Safari] detects their feed. If it doesn't, they will find out why and fix it. Even though stand alone feed readers will still be able to use the feed, I don't believe web site authors will ignore the fact that their feeds are broken for the readers built into hundreds of millions of web browsers.

Browser vendors have an opportunity to fix this problem. But they have to act *now*. IE does not yet have feed reading capabilities, so the majority of browser users have no expectation that their browser can automatically detect web site feeds. Once they get accustomed to their browser sniffing out and using feeds regardless of the content type, they will complain if later versions try to enforce stricter standards.

If you guys really care about the proper use of content types on the web, you will at least *try* to do something instead of just throwing up your hands and saying "Boo hoo. There's nothing we can do." If you don't try, you will have no one to blame but yourselves if 20 years from now feeds are still being served as "text/html"

Posted by: wg at September 12, 2006 9:00 PM

karl: This space is a wreck.

We have to sniff the W3C RSS feed because it's served as application/xml. It should be served with the unregistered type application/rss+xml to avoid sniffing.

Posted by: Robert Sayre at September 12, 2006 10:51 PM

Maybe we need to introduce a new HTTP header, which tells Firefox (and hopefully others in the future), to just render it as it should. No content sniffing, no quirks mode, etc.
This way, everything will just work for those who know what they're doing.

Posted by: Frederik Vanderstraeten at September 13, 2006 5:32 AM

Maybe you could use the Content-Type header for that. Instead of the whole "*+xml" mess there is now, people could use something like "application/xml;type=rss". It's backwards compatible, and doesn't break any written standards that I'm aware of.

Posted by: ant at September 13, 2006 6:00 AM

Hi,

I am using firefox for sometime now.
The current version that I am using is 1.5.0.4 and it is running on Solaris_10 x86 box.

The biggest problem that I am facing is, sometimes firefox crawls. It makes the whole OS freeze! And once firefox gets killed, everything becomes normal. The top command is showing this for my firefox:
PID USERNAME SIZE RSS STATE PRI NICE TIME CPU PROCESS/NLWP
1010 ns158690 948M 546M run 59 0 13:40:42 5.7% firefox-bin/6

So, firefox has eaten up 948MB and looks like there is lot of memory leak.

Is there any workaround to solve this?

Regards,
Narendra

Posted by: Narendra at September 15, 2006 1:38 AM

What the hell is up with this "new and improved" version of Firefox? (1.5.0.7) This evening I was using my machine and everything was working just fine until the new version downloaded itself with this new "spyware" segment. Now, unless I download the new segment, Firefox won't work at all. It just keeps shutting itself down.

TGTech

Posted by: TGTech at September 15, 2006 4:02 PM

whats up with those articles about the javascript engine?

Posted by: alex at October 2, 2006 6:44 PM