Google Ajax API allows us to easily import rss data using javascript. Using this simple script you can add any feed updates to your web site. Not only it is practical, it also makes sites load faster compared to php based readers.

RSS reader reads the feed after page load is complete so it doesn’t slow your page load. You can use a tiny loading image to show users something is loading there. You can view a demonstration of rss reader script here.


Follow steps below to add feed reader to your site.

1. Download feed_reader.js which includes api calls needed for rss access and post formatting.

2. Upload it to same folder with the your web page. Then simply add following code where you want rss reader to appear:
[javascript]<!– FEED READER START HERE –>
<div id="feed"></div>
<script type="text/javascript">
<!–

/* O P T I O N S */
blogURL = ‘https://wpassist.me’;
feedURL = ‘http://feeds.feedburner.com/shailan’;
postCount = 5;
excerptLength = 15;

//–>
</script>
<script type="text/javascript" src="feed_reader.js"></script>
<!– END OF FEED READER –>[/javascript]
3. Style it as needed. Here is a sample styling template:

<!--
#feed {font-family:Verdana, Arial, Helvetica, sans-serif; font-size:10px; width:300px;}
#feed a{font-family:Georgia, Helvetica, serif; font-size:14px; text-decoration:none; display:block;margin-top:10px;}
#feed .time{color:#999; font-size:10px;}
#feed .snippet{}
-->

You can view feed reader script in action on feed reader demo page.