
How to use RSS
Last updated: July 12, 2009.

Keeping up with the World Wide Web is amazingly difficult.
At the time of writing, there are no fewer than 110 million registered domains (somewhat
more websites), with over 92,000 new ones created in the last 24
hours alone. Look through the favorite bookmarks in your browser and
you'll probably find hundreds of sites you made a note of but haven't
visited for months or even years. However much we might like, it's
just not physically possible to visit every website that interests us
on the off chance someone might have added something new. How, then,
to keep on top of this "information overload"? One good trick is
to use RSS: a quick way of being automatically notified every time a
website you like adds some new content. Let's take a closer look at
how it works!
Photo: Left: RSS is probably the quickest, most efficient way to keep up with the ever-changing
world or the Web. This is our RSS feed of new articles as it appears in the Firefox browser. Right: Look out
for this orange logo: it tells you when an RSS feed is available.
What is RSS?
Most people define RSS as Really Simple Syndication. If
that sounds bafflingly complex (just what is "syndication"?),
don't worry, the basic idea really is simple: RSS is an easy way you can be notified
every time websites you like add new things that may interest you.
How does it work in practice? Websites that use RSS also publish very small files that list new or changed items they
want you to know about. These files are called feeds. Every
time a website adds something new, they also add a new entry to the
feed. You can set your web browser (or another program
called a feed reader, reader, or, aggregator) so
it checks a feed you're interested in at regular intervals (once a
day or more often if you prefer). This is called subscribing
to a feed. Then, when the website is changed, you'll see a new entry
in your feed reader with a link to the new material on the site. If
the item interests you, you can click the link to see the new stuff.
Really simple, eh? You can follow as many feeds as you like and
unsubscribe (stop following them) at any time.
Websites that publish RSS feeds typically use one of these icons to alert you
to the fact:
You can usually click on the icon to browse or subscribe to the feed.
Some sites publish a single feed covering all their pages; bigger or more
sophisticated sites may publish separate feeds for each of their pages.
Which feed reader?
There are lots of different feed readers and which one you use is entirely a matter of personal preference.
Most reasonably new browsers (including Mozilla Firefox, Internet Explorer, and Safari) have a
reader built in. If you're using Linux,there's a very good standalone reader called
Akregator (built for KDE, but
you can also use it very easily in Gnome). If you prefer to work online, you can also
follow feeds through online services such as Google (using Google Reader),
My Yahoo!, Facebook, and so on.

Photo: You can read feeds with whatever reader you please. Left: Our feed as it appears in Google reader; Right: Looking at the same feed in Akregator. The list of feeds appears in the pane on the left; the list of items in each feed appears on the top right pane, with new, unread items at the top highlighted in red. If you click on an item, the text appears
in the pane on the bottom right. (It's a bit like an email program with feeds showing up like folders and items within feeds appearing like emails in those folders.)
How do feeds work?
Virtually every serious website publishes RSS feeds these days
either in a standard format called RSS or an alternative format known
as Atom. Most readers can handle feeds in both flavors and,
for the most part, you shouldn't need to worry about the difference.
When you subscribe to a feed, your browser or feed reader downloads a
copy of the feed and stores it on your computer. Next time it checks
the feed, it downloads the same file and compares it with the stored
one. If the two files are different, it knows the feed has been
updated. If there are new entries, they're usually shown highlighted
at the top of the list. Most feed readers have a whole variety of
options you can set. Some will notify you every time there are new
entries in a feed (ones with dates more recent than the date of the
latest item in the stored feed); other readers are more sophisticated
and can be set so they won't notify you if the same page link is
posted twice (so you'll find out about new pages only, not changes to
existing pages).
How are RSS feeds built?
Here's a quick snatch from one of our feeds so you can get the
idea of what they look like "under the hood." If you're not building
your own websites, you'll probably never see this kind of stuff —and you don't
need to worry about it. It's just a quick glimpse in case you're interested.
Most feeds have the extension XML, which simply means that they're coded a bit like
webpages with each major element (the title, the date, the
description and so on) clearly identified by matching pairs of
appropriate tags with reasonably self-explanatory names such as
<title> and <pubDate> (when the item was published). The very first part of the feed tells you that it's coded in XML and RSS version 2.0.
Next comes a bit of information about what the feed does and who publishes it.
Underneath that, separate items are marked out between <item>
tags.
<?xml version="1.0" encoding="ISO-8859-1" ?>
<rss version="2.0">
<channel>
<title>Explain that stuff!</title>
<description>A collection of free, easy-to-understand articles, covering how things work, cutting-edge science, cool gadgets,
and computers.</description>
<link>http://www.explainthatstuff.com/index.html</link>
<item>
<title>Piezoelectricity</title>
<pubDate>Tue, 14 Jul 2009 11:00:00 GMT</pubDate>
<description>Sounds really complex but isn't! It just means making electricity by squeezing crystals. How does it work? How's
it used in everything from microphones and gas barbecues to LP-record-players and ultrasound scans?</description>
<link>http://www.explainthatstuff.com/piezoelectricity.html</link>
<guid>http://www.explainthatstuff.com/piezoelectricity.html</guid>
</item>
<item>
<title>Web hosting</title>
<pubDate>Sun, 12 Jul 2009 11:00:00 GMT</pubDate>
<description>With literally thousands of different companies offering hosting deals, how do you choose a really good one?
Should you just pick the cheapest? What exactly do you need to know before you press ahead and commit to a web hosting
deal?</description>
<link>http://www.explainthatstuff.com/what-is-rss.html</link>
<guid>http://www.explainthatstuff.com/what-is-rss.html</guid>
</item>
On this website, we publish a new articles feed that alerts our readers every time we add a new article. You can take a look at the feed now by clicking the link. Depending on which Web browser you're using, you'll
either see the feed displayed in a nicely formatted page or as the raw XML
(like the examples above). All you're doing here is browsing the XML feed files;
to see when they change, you need to subscribe to them.
How to publish RSS feeds on your website
If you're a web publisher, you can add feeds to your site very
quickly and easily. If you run a blog, use a social networking
site, or post photos on a site such as Flickr,
you'll probably find your page already has an RSS feed
embedded into it so other people can automatically be notified of any
changes you make.
If you run a website in your own way, you'll
need to handle the feeds by yourself. There are various tools you can use that build RSS
files for you or, if you're reasonably confident about editing tagged
files, simply create your own RSS file with a text editor. It's very
easy! Then just upload your feed to your site in the usual way and add
a link to it on your web pages (using the little orange RSS icon) so
people know it's there for them to use.
We build the feeds for this site in various different ways.
Sometimes we simply edit our feed by hand: each time we add a new
article, we edit the articles feed and add a new entry on top by
cutting, pasting, and amending the previous item. Another way to build
a feed is to copy from an HTML file and use a find/replace macro to change all instances
of the various HTML tags into corresponding tags in the RSS file.
You can see exactly what we've done by comparing these two examples:
Here's the HTML version:
<P><IMG SRC="e.gif" id="e" ALT="Bullet">
<span class="italic">Tue, 7 Jul 2009</span>:
<a href="http://www.guardian.co.uk/technology/blog/2009/jul/07/facebook-socialnetworking" target="_new">Facebook is growing up</A>:
It started out in schools and colleges, but now Facebook is
increasingly being dominated by thirty-something users.
</P>
And here's the RSS:
<item>
<pubDate>Tue, 7 Jul 2009 08:00:00 GMT</pubDate>
<link>http://www.guardian.co.uk/technology/blog/2009/jul/07/facebook-socialnetworking</link>
<guid>http://www.guardian.co.uk/technology/blog/2009/jul/07/facebook-socialnetworking</guid>
<title>Facebook is growing up</title><description>
It started out in schools and colleges, but now Facebook is
increasingly being dominated by thirty-something users.
</description></item>
You can see how a few simple find/replaces gets you from one to the other? Just make a little macro to store those in OpenOffice or Microsoft Word and you can instantly convert a snatch of HTML to RSS every time you need to.