I have a site that allows people to add their facebook, myspace, youtube, etc. accounts and get new messages, friend requests, etc from my page.

The problem with this is that...the more sites that a user adds, the slower loading the page becomes, because it has to wait for each site's response.

Question: Is there a way to fix this? Perhaps loading the functions after the page loads or something?

Any ideas are appreciated!

LAMPE

05-18-2008, 11:12 PM

unfortunately you are going to have to wait since you are pulling data from external servers. also be very careful with this because you are pretty much leeching their bandwidth and if you are making any money off that you could get in a lot of trouble.

Inigoesdr

05-19-2008, 12:31 AM

You could use AJAX to query each site individually after the page loads, and that way you could show some progress information.

also be very careful with this because you are pretty much leeching their bandwidth and if you are making any money off that you could get in a lot of trouble.
That's not really bandwidth leeching. You aren't linking them to some on another site's server or anything. You're logging in(presumably) to their account on the other site's server, and retrieving their friends list just as if they had browsed there. At worst you could say that the site might be losing ad revenue, but huge sites like Facebook/MySpace/Youtube, etc. aren't likely to care much, if they even notice.

syosoft

05-19-2008, 02:53 AM

I ran into a very similar problem during the Search result functionality of jigadig.com. We aggregate auction search results into a single interface from sites like ebay, amazon, ubid, etc.

The solution -to make the page appear to load faster - was to do the whole thing with ajax as mentioned above. It came out really well, i suggest you take a look as it might lead you in the right direction.

http://www.jigadig.com/Search/All/?satitle=DVD

ironj221

05-19-2008, 09:59 AM

also be very careful with this because you are pretty much leeching their bandwidth and if you are making any money off that you could get in a lot of trouble.
I don't think this is a problem because each of these sites has an API that allows you to pull information from their site which I am using. Also, I'm only getting the number of new messages -- then the user must go to the site to view them or interact.

Thanks for the ajax tip, I will deffinately consider this option and appreciate your feedback.

BTW, your Jigadig site is a very cool idea! It's too bad the search results take so long for each site.

syosoft

05-19-2008, 02:53 PM

Yea, 1/2 the problem is that these sites dont have an official API, and the ones that do don't provide all of the desired information in a single call.

aedrin

05-19-2008, 04:16 PM

I ran into a very similar problem during the Search result functionality of jigadig.com. We aggregate auction search results into a single interface from sites like ebay, amazon, ubid, etc.

The solution -to make the page appear to load faster - was to do the whole thing with ajax as mentioned above. It came out really well, i suggest you take a look as it might lead you in the right direction.

http://www.jigadig.com/Search/All/?satitle=DVD

Doesn't seem like that solved the problem. It never even seems to load the page. Just sits there transferring content/waiting.

syosoft

05-19-2008, 05:01 PM

Aedrin, Why dont you be a gem and provide your os/browser choices because as far as I can tell, pure ajax load coupled with infinite scroll is working quite well.

ironj221

05-20-2008, 12:42 AM

I just wanted to thank you both again -- I implemented the ajax and it works great!
Something I didn't even thing about, it also solves the problem of the site not loading when an external site was unresponsive.