Skip to content

Instantly share code, notes, and snippets.

@superfeedr
Created June 30, 2009 12:04
Show Gist options
  • Save superfeedr/138121 to your computer and use it in GitHub Desktop.
Save superfeedr/138121 to your computer and use it in GitHub Desktop.
<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
<title>Superfeedr Blog</title>
<link href="http://blog.superfeedr.com/atom.xml" rel="self"/>
<link href="http://blog.superfeedr.com/"/>
<updated>2009-06-23T10:05:53-07:00</updated>
<id>http://blog.superfeedr.com/</id>
<author>
<name>Julien Genestoux</name>
<uri>http://twitter.com/julien51</uri>
<email>julien@superfeedr.com</email>
</author>
<category term="Superfeedr" scheme="http://www.sixapart.com/ns/types#tag" />
<category term="Feed Parsing" scheme="http://www.sixapart.com/ns/types#tag" />
<category term="Songs from Finland" scheme="http://www.sixapart.com/ns/types#tag" />
<entry>
<title>RSS or Atom, not both!</title>
<category term="Gospel" scheme="http://www.sixapart.com/ns/types#tag" />
<link href="http://blog.superfeedr.com/feeeds/gospel/atom-or-rss-not-both"/>
<updated>2009-06-23T00:00:00-07:00</updated>
<id>blog.superfeedr.com:/feeeds/gospel/atom-or-rss-not-both</id>
<content type="html">&lt;p&gt;&lt;a href=&quot;http://en.wikipedia.org/wiki/RSS_(file_format&quot;&gt;&lt;span class=&quot;caps&quot;&gt;RSS&lt;/span&gt;&lt;/a&gt;) and &lt;a href=&quot;http://www.atomenabled.org/developers/syndication/atom-format-spec.php&quot;&gt;&lt;span class=&quot;caps&quot;&gt;ATOM&lt;/span&gt;&lt;/a&gt; have very similar (if not identical) purposes. I don&amp;#8217;t know any feed consumer that consumes only one type, yet, a lot of services are still providing both.&lt;/p&gt;
&lt;p&gt;Publishing both is useless, because it&amp;#8217;s likely that services will end up polling both of them, to identify new content. It is very hard for them to be 100% sure that they actually contain (and will always contain) the same information. You know that &lt;a href=&quot;http://blog.superfeedr.com/gospel/something-stupid/&quot;&gt;polling your blog or service is stupid&lt;/a&gt;... don&amp;#8217;t make twice as stupid.&lt;/p&gt;
&lt;p&gt;Yet, if you publish both &lt;span class=&quot;caps&quot;&gt;ATOM&lt;/span&gt; and &lt;span class=&quot;caps&quot;&gt;RSS&lt;/span&gt;, make our lives easier in two steps :&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Remove the extra &lt;code&gt;&amp;lt;link href=&quot;...&quot;&amp;gt;&lt;/code&gt;, by keeping just Atom or &lt;span class=&quot;caps&quot;&gt;RSS&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;ul&gt;
&lt;li&gt;Add a 301 redirection from one to another, so that you&amp;#8217;re not messing with your existing pollers (as they should probably follow redirections and be able to parse either format) : with Apache it&amp;#8217;s as easy as: &lt;code&gt;RedirectMatch 301 /statuses/user_timeline/(.*)\.rss http://twitter.com/statuses/user_timeline/$1.atom&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;No more excuse for not doing it! Please note that I am not discussing whether you should keep &lt;span class=&quot;caps&quot;&gt;ATOM&lt;/span&gt; or &lt;span class=&quot;caps&quot;&gt;RSS&lt;/span&gt;. I&amp;#8217;d go for Atom, but that&amp;#8217;s a not the case for everybody.&lt;/p&gt;</content>
</entry>
</feed>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment