Ø
«
»
0 : RSS/Atom Feeds: Best Practices
1 : Do I Need to Worry About This?
2 : Where Are You?
3 : General Guidelines for Producing Feeds
4 : Producing Public Feeds
5 : Producing Private Feeds
6 : Consuming Feeds
7 : Intermediary Syndicators
8 : Adding Extensions
9 : Further Pointers
RSS/Atom Feeds: Best Practices
John Panzer
System Architect
AOL
Do I Need to Worry About This?
The following may be useful if making the pipes work is your job, and:
You need to produce RSS or Atom feeds.
You consume feed data.
You cache, proxy, or transform feed data.
You present feed data to an end user.
You need to create feed extensions.
You want to provide open, standard APIs for your data.
Where Are You?
Producer?
Consumer?
Intermediary Syndicator?
Server?
Client?
(
diagram source: Patrick Chanezon
)
General Guidelines for Producing Feeds
Prefer
Atom 1.0
format (second choice:
RSS 2.0
).
Use the
Feed Validator
early and often.
Ensure
unique IDs
for articles.
Support
autodiscovery
; don't use text/xml content type.
Use atom:summary for summary data, atom:content for full content.
Embed well formed XHTML; escape anything not
guaranteed
to be well formed.
Consider an XSLT style sheet.
Consider using the
standard feed subscription widget
.
Producing Public Feeds
Consider using
Feedburner
.
Consider embedding
license metadata
(
details
).
Support caching through
Conditional GETs
.
Consider using a proxy cache for high traffic feeds (e.g., Akamai
Feeds Platform
)
Use a
301 permanent redirect
to send clients to the new source when a feed URL changes.
Consider using
ping services
(
Technorati
,
Blogpulse
,
Feedster
, Moreover, Pingomatic, Buddy Feeds,
Yahoo
!, etc.) to notify 3rd parties about feed updates.
Producing Private Feeds
For reasonable interoperability+reasonable security: Use HTTP Basic Auth over SSL.
For high interoperability+low security: Use 'obscure' feed URLs.
Consuming Feeds
Accept at least Atom 1.0 and RSS 2.0. Consider supporting other variants.
Use a library or proxy to normalize all feed formats for you (RSS 0.9x, RSS 1.0, RSS 2.0, Atom 1.0).
ROME (Java Library)
Universal Feed Parser (Python)
Consider using the
Feeds Platform
to proxy, normalize, and cache (and for storing subscription data)
Support
autodiscovery
.
Honor
license metadata
(
details
).
Support caching,
conditional GETs
, and
301 permanent redirects.
Honor RSS TTL directives; do not over-poll.
Intermediary Syndicators
Follow all guidelines for producing and consuming.
Pass through all content whenever possible (especially unknown extensions)
Strongly consider following the
User-Agent subscriber reporting de facto standard
.
Support private feeds if relevant.
If mashing up multiple feeds into a single synthetic feed:
Use Atom 1.0's atom:source element to preserve source feed information.
Honor and maintain all source feed licenses.
Adding Extensions
Re-use or borrow from
existing
extensions.
(Atom elements can be used as extensions in RSS if necessary.)
Document your extensions publicly.
Consider using a
microformat
instead.
Further Pointers
Atom 1.0 (RFC 4287)
atomenabled.org
On RSS and Atom
IE7 Feed Autodiscovery
Picking a feed format
Google Reader Platform
rssextensions.org
Book: Developing Feeds with RSS and Atom
A few issues with RSS ambiguities
(
[2]
,
[3]
,
[4]
,
[5]
,
[6]
, ...)
Atom in a Sea of RSS