Frank Parent
Frank Parent

Reputation: 2164

Smartest way to load RSS feeds between Ajax and Server-side

Given the choice of technologies to load and render a small RSS Feed on your homepage, would you go for an Ajax (async) solution or something more oriented server-side (I'm using node.js)?

I know some of the pros/cons for each methods, but I ignore at what extent the server-side request would be more heavy on the initial load time of the page.

Upvotes: 0

Views: 1108

Answers (1)

TheRocketSurgeon
TheRocketSurgeon

Reputation: 146

I've had a lot of success using the Google Feed API to implement RSS feed output on web sites.

It allows you to query one or more RSS endpoints and get a JSON response back, which is then pretty easy to parse out and display as you want it.

https://developers.google.com/feed/v1/devguide#hiworld

I usually use this in an AJAX call, but I don't see any reason why you couldn't use this server-side in node.

Your decision would depend on whether you want to load the RSS items into the browser after the page has loader, or if you want to serve it up with the initial page load (via node server-side code).

Pretty easy to mix this in with a JQuery $.getJSON() as well. This is my chosen method. Works well with any other client-side magic you might want to implement, e.g. scrolling news items, etc.

Upvotes: 1

Related Questions