Why syndication feed readers (and web browsers) should fail gracefully

December 11, 2008

There are two schools about dealing with errors in pseudo-XML formats like syndication feeds and XHTML: strict failure (the Firefox model, where the user gets a big BZZT dialog) and graceful failure (the Universal Feed Parser model, where you try to get as much as possible out of things). Which school is better is one of those frequently argued things on the Internet.

(Yes, yes, theoretically both syndication feeds and 'XHTML' are real XML and there is only one valid failure mode. This is not true in the real world.)

But it's recently occurred to me that there is a really simple summary of why I think graceful failure is the correct answer. It is this observation:

Strict failure punishes the reader for the sins of the site author.

(And yes, preventing people from reading something that they've expressed an interest in is punishing them.)

Much as the browser is the wrong place to warn about HTML errors, feed readers are the wrong place to complain about invalid feeds. Unless the author reads their feed, those big BZZT dialogs are being shoved in the faces of people who had nothing to do with the problem, which means that you are punishing the wrong people. And my belief is that punishing the wrong people is pretty much always the wrong thing to do.

(The same logic applies directly to browsers dealing with XHTML.)

Written on 11 December 2008.
« Why you should always allow version 1 to be specified
Two-step updates: the best solution to the valid XHTML problem »

Page tools: View Source, Add Comment.
Search:
Login: Password:
Atom Syndication: Recent Comments.

Last modified: Thu Dec 11 23:02:31 2008
This dinky wiki is brought to you by the Insane Hackers Guild, Python sub-branch.