0

I'm in a somehow tough situation here. I need to load data from multiple rss feeds into my page without slowing the page load. I first used Ajax to do so but my boss insisted that it should not affect the seo ranking of the page.
Therefor I think Ajax is out of the question here. Now I need to find a workaround for this problem very soon.
The other rss feed origins are all wordpress and are located on the same server (they're actually ours) and I have direct access to database.
I thought maybe I could make my own database connection and query the data, but without the wordpress built in functions and classes it's kinda difficult to do.
I'm open to any suggestions.

2hamed
  • 8,719
  • 13
  • 69
  • 112

2 Answers2

0

Nettuts has a good screen cast on using SimpleXML to parse and display an rss feed. It should give you what you need to load everything on the server side, so Ajax doesn't hurt your SEO.

http://net.tutsplus.com/articles/news/how-to-read-an-rss-feed-with-php-screencast/

Kevin Perrine
  • 407
  • 2
  • 14
  • The problem with reading rss feeds is that it slows down my page load horrendously. Apart from that I have no problem making my own rss reader. – 2hamed Aug 18 '12 at 07:21
  • If it's slowing it down that much, you can always add a short timeout ([example-1](http://www.php.net/manual/en/function.simplexml-load-file.php#108180) [example-2](http://www.php.net/manual/en/function.file-get-contents.php#82527)) to getting the file and then only use those feeds that responded quickest. Assuming, of course, you don't need *all* the information. – Kevin Perrine Aug 18 '12 at 11:56
  • Additionally, you could setup a cron job to grab the various xml files and cache them locally every X minutes, and then parse them straight from disk instead of loading them over the web. – Kevin Perrine Aug 18 '12 at 12:03
0

I would recommend using javascript webworkers which will get the rss feed data using background thread. It will not disturb your UI thread and hence maintain good user experience. I even implemented searching and sorting using web workers. But check the compatibility of web workers on different browsers at caniuse . Also, according to wikipedia IE10 has support for it. So, If you can make it work, it can do wonders for you.

Avichal Badaya
  • 3,423
  • 1
  • 21
  • 23