Snazzy New Ajax/JavaScript Facebook Image Implementation

If you’re like me, you frequent the “View more pictures of ‘So and So'” Link underneath the main picture of most of your friends on Facebook when you look at their profile.

Just yesterday I was looking at these pictures and realizing some unusually rapid response times. Now bear in mind I’m on a college campus with a 50MB pipe to the internet, but I’m talking ridiculous times.

I decided to do a little investigating:

If you check the page source after clicking on ‘more pictures,’ there’s a new JavaScript function at the bottom of the page which is ridiculously long. I thought, shit, why is this so long? As it turns out, Facebook uses a service called Akamai which caches images across networks to save on bandwidth for server hosting. It’s a real neat service on its own, but I won’t go into that. They were already using this before this recent explosion of efficiency.

Digging a little deeper into the code reveals a JavaScript function call to “Photostream.” I’ve attached this JavaScript, but it looks like a pretty damn slick implementation of Ajax, where the server is updating the browser without refreshing the page.

What I’m wondering now is: is it simply because of my internet connection that the increase in photo click-through efficiency, or does everyone see this speed enhancement?

Either way, nice job guys!

Photostream JavaScript/AJAX Implementation

Posted in Computer Science, Technology Tagged with: , , , , ,

Leave a Reply

Your email address will not be published. Required fields are marked *

*