Tuesday, April 6, 2010
RSS asks for a compact and structured version of a website, so users can easily subscribe and receive the latest updates. I heard a lot about RSS for years, but I never managed to adopt it. I guess I am happy with discovering content from social networks, where information is mostly ranked by human interest, not merely by time or artificial intelligence.
Anyway, I recently learned more about RSS from adding RSS support for Mike Matas’ website. If you are using blogging services like Blogger or WordPress, you probably get RSS support for free. For those who don’t, there are two steps:
- Create a RSS feed. There are two popular RSS feed formats: RSS 2.0 and Atom 1.0. I decided to go with Atom, which is basically a XML document with self-explanatory tags:
<?xml version="1.0" encoding="utf-8"?> <feed xmlns="http://www.w3.org/2005/Atom"> <title>tabqwerty</title> <link href="http://tabqwerty.com/atom.xml" rel="self" type="application/atom+xml" /> <link href="http://tabqwerty.com/" rel="alternate" type="text/html" /> <id>http://tabqwerty.com/</id> <updated>2010-04-06T21:53:19-07:00</updated> <author> <name>Chi Wai Lau</name> <email>firstname.lastname@example.org</email> </author> <entry> <title>Hello World</title> <link href="http://tabqwerty.com/hello-world.html"/> <updated>2010-04-06T00:00:00-07:00</updated> <id>http://tabqwerty.com/hello-world.html</id> <content type="html"> <p>Hello World!</p> </content> </entry> <entry>...</entry> <entry>...</entry> </feed>
- Reference the feed. Similar to how you would reference a CSS file in the html document, you would include the link of the RSS feed to the header:
<html> <head> ... <link rel="alternate" type="application/atom+xml" title="Recent Entries" href="http://tabqwerty.com/atom.xml" /> </head> ... </html>
That’s it! I was expecting some kind of notification step when the RSS feed was updated, but then I realized that RSS is a pull technology, which means that the readers get updates from pulling the feed periodically.
In the process of working with RSS, I discovered a Google product called FeedBurner. I was a bit skeptical about it because its website looked quite run-down. Nonetheless, it is useful for tracking your feed and generating an “adaptive” feed that supports both RSS 2.0 and Atom 1.0 readers. FeedBurner does the magic by adding a layer of indirection; instead of referencing your own feed in the header, you would create and reference a FeedBurner feed that references your feed. FeedBurner works, but I really hope that Google can just give it a facelift..