Skip to Content

Aarron Walter

XHTML | CSS |

My Book: Building Findable Websites

Building Findable Websites: Web Standards, SEO, and Beyond
Building Findable Websites: Web Standards, SEO, and Beyond
Aarron Walter
Buy on Amazon
Book's Companion Website
Companies waste fortunes seeking a magic bullet for Search Engine Optimization. But the keys to honest, effective web findability are appropriate writing and semantic markup. Aarron Walter’s wonderfully lucid and informative book tells everything you need to know to get your web content (or your client’s) in front of as many appreciative readers as possible.

- Jeffrey Zeldman, founder, Happy Cog Studios author, Designing With Web Standards, 2nd Edition

Now playing on my computer

MSNBC.com copyright 2008 FF-RE – MSNBC Hardball wit... Track | Artist
cnet.com – Buzz Out Loud 761: Debt by data plan Track | Artist
The Smiths – Death of a Disco Track | Artist
Flii Stylz – Rize Score Suite (with Flii Stylz & Re... Track | Artist
Wilco – Instrumental #2 (Take 2) Track | Artist
My Playlist Feed | My Last.fm Profile

Recent Photos From Flickr

Hatch Show Print Posters, Thu, 12 Jun 2008 14:49:05 -0800 Hatch Show Print, Thu, 12 Jun 2008 14:46:11 -0800
Hatch Show Print, Thu, 12 Jun 2008 14:43:52 -0800 Ari, Thu, 12 Jun 2008 14:21:10 -0800
My Flickr Photo Stream | All Photos

Parsing RSS Using Magpie and Ajax

29 Dec . 2006

DMXZone.com has recently published an article of mine explaining how to parse RSS feeds using an open source PHP library called Magpie, and Ajax to handle the loading of the feeds. The feed reader is scalable to display as many or as few feeds as needed using an array to conveniently configure the script. If JavaScript is disabled or unavailable in the browser, the script gracefully degrades to offer a manual method of loading the feed headlines to the page rather than becoming disabled because of the Ajax calls that load them normally. Ajax is used in this example because fetching and parsing many feeds from many sources can result in an excessive page load delay as the script waits for all results to arrive. Using Ajax, you can display the headlines for each feed as they are received, resulting in an improved user experience.

You can take a look at the finished example, and download the code archive to see how it works.

3 Responses to “Parsing RSS Using Magpie and Ajax”

  1. Brian Says:

    Thanks for this code, Aarron. I used it and it works great.

    I have a question, though. I was wondering if there was a way to make the displayed text more SEO friendly. As you know, one of the benefits of having blog headings on a page is there is the potential for these headings to contain keywords, which could enhance the page’s visibility. Also, the changing content looks good to search engines, making the site look like it is updated frequently.

    Since the headings are brought in dynamically they lose that SEO benefit. I don’t know enough about PHP/Ajax/Rss to evaluate any alternatives or solutions. I was wondering if this is something you’ve thought about or had a solution for?

  2. Aarron Says:

    This is a good question that is addressed by building these sorts of JavaScript driven applications in an accessible manor. The solution is actually already built into the article. I use a noscript tag to show a link that manually loads in the RSS headlines if JavaScript is disabled/not available. Search engine spiders will trigger that link and get to the headlines all the same, refreshing the page with the headlines loaded. The PHP script looks to see if the RSS parsing request is coming from an Ajax call or a regular, JavaScript free call. The result is a slower load when done without the Ajax because all of the headlines have to be parsed before sending it to the browser, but the content is still the same. This is generically referred to as Progressive Enhancement.

    Jeremy Keith has a book that will be coming out this month called “Bulletproof Ajax” that explores other Progressive Enhancement techniques in more detail.

  3. entro Says:

    This is a good example of clever ajax usage but still does not produce the desirable SEO effects.
    A perfect SEO solution would use the same page and render the same html results whether a client uses javascript or not.

Share Your Thoughts

* indicates required