Tweaking My RSS/Atom Feed Reader

Website364 words2 minutes to read

I spent about five hours last night playing with my RSS Reader. I think I’m beginning to get the hang of some of this PHP stuff. Anyways, I’ve made some tweaks here and there to make it a bit more friendly.

The first thing I did was make it more error-friendly. If someone mistypes a feed URL, instead of seeing nonsense errors that have no value to the user, you get a simple error page that suggests that there was a problem with the feed, and to try a new feed URL.

The next thing I did was allow the user to skip the http:// protocol as long as there was a www. at the beginning of it. If the URL doesn’t have a www., then the http:// is required.

I also added support for the feed:// protocol. I did two things with this. Since the protocol is the same as http:// anyways (it’s designed to help feed readers subscribe a feed), I have the RSS Reader strip out the feed://, and replace it with http:// so that Magpie can parse it. The other thing I did was add an option to subscribe to a particular feed on that feed’s page (i.e. Zeldman). This should be fairly convenient.

Another thing that I’ve made an attempt to support is auto-detection of RSS feeds. Sites that have something along the lines of this:

<link rel="alternate" type="application/rss+xml"
      title="RSS" href="/rss/skyzyx.xml" />

It seems to work for some sites, but not for others. I’m still working on why the inconsistency exists, but I plan to have it worked out as soon as I get around to it. Some examples of sites that auto-detect are: The Daily Report, StopDesign, and Simon Willison. Some examples that don’t work are Superfluous Banter, Whitespace, and my own

I’ve modified the user-agent string. To find out what it will return on your sites, load a valid feed, then check the source. I’ve noted it in the comments. Anyways, I hope that this tool is useful to someone.

Speaking of, what do you think about online RSS/Atom readers? Are they better or worse than desktop applications? What are some pros or cons of each?

Ryan Parman

Ryan Parman is an experienced software engineer, open source evangelist, and passionate user advocate currently living in Seattle. He is the creator of and , and worked on DevOps and Security at . He is now bringing learning into the digital age as an Engineering Lead and Site Reliability Engineer at . Ryan's aptly-named blog, , is where he writes about ideas longer than .