How to decrease load time for my site (RSS reading)
joseffbetancourt.com is a site i really made for one reason, me. I love the yahoo homepage and the wnbc one as well but I wanted something without the ads.
So I tossed together a bunch of stuff I use (still building it) and called it a day.
The site has a ton of RSS feeds that supply it the blog, news, weather, etc. I dont want to reload the site when you click a different news area.
Any one know any compression methods for making a RSS feed load faster?
JoseffB posted this at 18:14 — 25th October 2006.
He has: 52 posts
Joined: Oct 2006
anyone?
JeevesBond posted this at 18:25 — 25th October 2006.
He has: 3,956 posts
Joined: Jun 2002
Well I assume you want the feed to be compressed to save bandwidth and make it load faster. The problem is that the feed would need to be compressed when you're downloading it fromt he host site.
You have no control over whether they compress their RSS feeds or not. In fact it might already be compressed and you don't even know it (your script for getting the RSS feeds might just seamlessly decrompress it)!
What about changing (or finding) a script that stores the RSS feed on disk for a certain length of time, then instead of it getting the feed every time you load the page it just reads it from disk?
a Padded Cell our articles site!
JoseffB posted this at 19:57 — 25th October 2006.
He has: 52 posts
Joined: Oct 2006
that would work if the feeds are all released at same time but they all seem to be at different update intervals (som every 12 hrs other 3 hrs, others every week).
I think I will do a php conditional and reload the page on click.
It's for the better good of mankind i guess.
JoseffB posted this at 22:23 — 25th October 2006.
He has: 52 posts
Joined: Oct 2006
Fixed it to be php processed for each area.
One question though I have the conditional set to a basic
varblah == $get_(Section));
then each section doesd a if = to its number type of thing to runthe rss.
Does this leave me open to an injection attack?
Abhishek Reddy posted this at 00:55 — 26th October 2006.
He has: 3,348 posts
Joined: Jul 2001
Not if all you're doing is testing for equality. Don't evaluate the value of the variable, or use it directly anywhere. Quoting user input is a good idea.
I'm not sure what you mean by trying to speed up your RSS feeds or avoid reloading; it's not very clear. However, I think Jeeves has the right idea with caching feed data on your server. You really don't want hit upstream servers every time someone loads your page, as it wastes bandwidth. Some admins block your requesting hostname if they don't like it.
Have a script that refreshes its feed cache every hour or two, either as a cron job or simply comparing times on every load. It will be faster for you too. There are many scripts that will do it for you, a quick search should bring them up.
Want to join the discussion? Create an account or log in if you already have one. Joining is fast, free and painless! We’ll even whisk you back here when you’ve finished.