Why Facebook’s “Like” button is so slow

Along with most bloggers, I’ve lusted over Facebook’s “Like” button. There’s nothing that quite matches it on the web. It’s small and simple. What could be easier than putting a harmless little icon on your site to let visitors vote for you right?

But I got a nasty shock when I installed it. It makes at least thirty separate calls to Facebook servers and your site takes forever to finish loading. Any webmaster will tell you that the first step to improving your page speed is to cut down the number of requests to the server. From this perspective, Facebook commits a crime – an unforgivable transgression.

I’ve tried three different ways to install it on WordPress – using the code from Facebook and installing two separate plugins. It doesn’t make a difference. The button is still a resource hog. Here’s a screenshot of the requests from tools.pingdom.com:

Facebook "Like" Button Requests

Facebook's "Like" Button - the huge number of requests

This shows only a part of the total requests made to Facebook’s servers. Go ahead and test any page which has the button on tools.pingdom.com. You’ll be astonished at how long it takes to load – scroll down to the bottom and it’s pretty obvious what the cause is.

While it’s true that the button starts loading only after the page has begun to render, there’s something just wrong about such an obscene number of calls. It just doesn’t feel right you know what I mean? For those with slow Internet connections, I can imagine their systems working hard just to display the damn thing.

Google is rumored to be developing its own “Like” button in conjunction with Google Me. I’m eagerly waiting for it in the hope that it’ll go easy with the http requests. After all, it’s Google who’s really pushing for faster speeds on the Internet and even going so far as to link the PageRank to it. Come on Google! Give me an alternative to Facebook bloat.

Like this post? +1 it!  

Related Posts:

22 comments to Why Facebook’s “Like” button is so slow

  • [...] After spending quite a bit of time on this project, we’ve determined that the button is just too dang slow for us.  Our map is quite snappy and responsive in Safari and Firefox, but a little clunky in IE [...]

  • Simon

    Agreed. This sucks.

  • I agree, from a performance perspective it's very badly designed. This small button makes more requests, and takes longer to load than the rest of my page put together. Sort it out Facebook!

  • I just installed the Like button on my site and it added 4 seconds to my load time; that's more than the rest of my page combined! And the like button is such a small button too. Those requests just don't seem necessary.

    I managed to make a custom version of the regular share button using PHP, but I don't think its possible to do this for the Like button. I'm considering on removing it. It's a useful one click way to share posts, but at the expense of dozens of additional requests.
    My recent post WOT vs SiteAdvisor vs SafeWeb – PrizeFly Friday

  • Further, the button is over 30kb including scripts. Imagine the millions of views it gets daily… seems like a giant waste of bandwidth and expense for Facebook. Maybe if they were a public company they’d make it more efficient. Meh, I’m also looking for alternatives that tap the same API without all the requests.

  • This “Like” button is a joke! Wake up Face-buk!

  • max power

    I blocked every facebook server with adblock.
    Now the websites load like before.

    I just don’t want to wait 5-15 seconds for the LIKE LIKE LIKE button.

    I hate facebook, sorry.

  • What else is facebook doing to my page with Like buttons? I’m just trying to display a Like button link and number of people Liked, it should be 1kb and 1-2 server request! Are they tracking users like Google Analytics?

  • An alternative would be to use FB Share button, outdated, but it works just like the Like button now(same counter number). Sure, it appears differently on user’s wall, but that’s another story.

  • Try loading the SDK asynchronously, the button loads much faster.

    developers.facebook.com/docs/reference/javascript/

  • Sam

    I would dearly love to see performance improvements, but keep in mind that in order to show how many people have “Liked” something, you have to connect to Facebook to get that info… for each link you want the info for. And it has to be relatively fresh information too in order to provide much value.

  • Hi Bhagwad

    I also had the same issue with my site, Facebook was making the load times just impossible.

    So I tried what Jeffrey suggested and guess what, the load time just came back to normal, duno if the like button itself is working, but atleast the load time is normal.

    Just my 2 cents on an issue that was blowing my mind. By the way I’ve put the Iframe thing inside of the div that facebook suggests, duno if that is the right implementation, but seems to work fine.

  • Andre

    Here’s the solution to the problem, you need to load the FB Like button as the user scrolls it into view only.

    See http://stackoverflow.com/questions/6838254/lots-of-xfbml-facebook-like-buttons-are-slow/6847489#6847489

  • Have you found a way to reduce the load time? Im having that problem too, especially on the index page. To me it looks as if every button would load its on css and script files, even though they all use the same css/javascript. I dont know however if theres a way to fix this…

  • to avoid this problem i had to disable faces and streams by making them false and this results in fast load but without faces your site wont attract even more viewers because people like to click button when they see other peoples faces. my site moviesdig.com loads in 3 seconds average now and anything over 5 second load time is unattractive to google.

  • Thinking about just placing a Facebook icon that links to my page, but I don’t think users would take the 2 step process to “Like” my site. Wouldn’t be such a big deal if I wasn’t convinced that “Likes” matter with SEO.

  • ive solved the problem, use the xfbm, example use the code i have on moviesdig.com and change the fb site to ur site name, this script loads fast. i copied it from amit agarwals blog. my main movie site page is very long vertically with tons of pictures and movie thumbnails and even youtube vids but i managed to make it all load in 6 seconds. according to pingdom tools, only the youtube vids are causing it to load in 6 seconds, facebook like with pics of faces and entire site loads in 3 seconds.

  • FB seem to have sped their button up recently but it isn’t a patch on Google + button which loads super sharp on my site.

    how does the Twitter button compare? thinking of adding that but site speed is already an issue for me…

Leave a Reply