🌱 RSS / Atom Feed
Web Feed Syndications in XML format. Feeds are commonly used to keep track of many different websites in a single news aggregator.
TL;DR
As Feed Creator
- Serve both RSS and Atom feed whenever possible
- Extend RSS fields with proper namespace
- Make sure to proper sanitize or encode content in tags, sometimes with CDATA
- Always use UTF-8 encoding
As Feed User
- Lookup feed with method describe below.
- Choose Atom feed if available, because the specification is more unambiguous hence less interpretation error.
RSS
The original specification is published by Harvard Law, more formal and practically useful version is published at RSS Advisory Board. The latest version is 2.0.11 and has not changed since 2009.
Extending
RSS 2.0 onward allows custom extending, as long as
- Custom fields are Documented in namespace
- Format conformed to XML 1.0
See more in docs. One of the widely used extended namespace is Media RSS created by Yahoo!, docs can also be found on RSS Advisory Board.
Autodiscovery
A special <link>
tag can be added to the <head>
of HTML to allow other services easily locate feed location. More can be found on RSS Advisory Board.
Validation
Use W3C Feed Validation Service. A list of errors and warning can be found in the docs.
Atom
Atom specification is defined by the following two RFC:
Feed Location for Specific Sites
Check out Open RSS to find feed for more sites.