Facebook is slow, but there’s an easy fix

It seems like the Facebook engineers add another javascript and css file to their pages with every new feature. As of today, viewing the Facebook homepage loads 36 javascript files from Facebook and 4 more from advertisers. In addition to these 40 files, there are 12 css files.

That’s a lot of files! If you’ve ever noticed the excessive flickering happening in your browser’s status bar when you go to Facebook, this is the cause.

How can they improve the situation? The total file size isn’t too terrible at about 100k of JS and 40k of CSS. The best thing to do would be to use a simple build script that concatenates all these files together into one larger file. If they can’t do that for some reason, they could at least serve the files from more than one domain to take advantage of parallel downloads in the browser. They could also try a service like Akamai, but that’s a bit more complex and expensive.

This seems like a really silly oversight from an organization that in general produces beautiful work. My guess is that when the company was getting started they set up a relatively simple build process that has now become ingrained and difficult to alter as their setup has quickly become larger and more distributed. However, they’ve reached the point where it’s time to revisit things and do it properly.

47 Responses to “Facebook is slow, but there’s an easy fix”

  1. Peter Bromberg Says:

    I may have a better solution: don’t bother even visiting Facebook, since it’s alread becoming pass√©.

  2. Ryan Says:

    Useless post.. does not explain how to fix the actual problem! Waste of 1 minute.

  3. Gigi Says:

    Its a good post – explains the problem, suggesting a solution on Facebook’s part. Good job

  4. Claudio Says:

    Useless post

  5. Your Father Says:

    Technically correct, but absolutely useless.

  6. moke102 Says:

    could maybe one of you cleverheads, or a really clever one tellus not so clever ones a second solution instead?
    thanx in advance ( and good hope)

  7. Fabian Says:

    Does not help me at all… send it to facebook… im still wondering whether to go have a shower or have my lunch or rather do both while facebook continues to load!!!!!

  8. Martin Says:

    I am writing this as I wait for Facebook to load… I thought it would have been down to the amount of traffic, although as it’s 9am I would imagine it isn’t ‘peak’ time so I agree it must the scripting.

    Message to Facebook – get your finger out, for one of the worlds biggest social networking sites, this is pathetic.

    Oh, great ‘Problem loading page’. What a surprise.

  9. Tracy Says:

    Cannot believe this, once I get into the swing of things this silly site decides to work EXTREMELY slow! What’s going on facebook?? sort it out pls!

  10. Xterminator Says:

    Yea Facebook is getting damn slow from this past week!!!.. they need to do something quick.. im running out of patience.

  11. Pro Ro Says:

    Are most people using IE to view Facebook? I’ve found that Firefox now seems to deal with Facebook a lot quicker than IE does, so have started using that instead.

    I’m not an MS basher – I usually find IE more functional than Firefox in general (bet this will generate some flames!) so I still use it for other browsing, but it may be worth a try if you visit Facebook frequently.

  12. matty p Says:

    did that !@# at the top actually say ‘passe’
    whats passe, getting in touch with old friends
    doing business…? or just being a facegeek…
    i agree its a bit overhyped, and its not perfect, but it serves a very good purpose
    …sorry, its just…
    besides, who says ‘passe’

  13. jfn Says:

    This past week I keep getting timeout errors when trying to log in to facebook. The login page comes up quickly enough, and I was also able to browse their help pages fast as well – but when I key in my email and password, then hit the login button, the page goes white, sits for a while and then I get the timeout error. A right royal pain in the rocks! Every other webpage I visit is working as normal. Any ideas what this could be?


  14. Nico Says:

    Same from Switzerland (MUCH slower since abt 3 weeks, timeouts, etc.)…

    But indeed, apart from the good feeling of not being the only one with the problme, quite a useless post (what is the fix?)

  15. Udi Says:

    If you want a fix, I’d suggest forwarding a link to this post to Facebook. They’re the only ones that can fix this issue.

  16. Facebook: fix your load times « Jared Tame @ Phunctional Says:

    […] And the explanation is here. […]

  17. Kenny Brunton Says:

    I’m not a fan of facebook (faeces book as I call it). Kind of ditched them when I discovered Microsoft had dibs in their advertising.

    Here’s a tip which may help though, install a hosts file on your PC that blocks their advertising – okay, it wont fix all the issues.

    Just these may work (not sure) ads.facebook.com ads.ak.facebook.com

    Alternatively – visit here http://www.mvps.org/winhelp2002/hosts.htm where there’s plenty of information and a good hosts file you can use.

  18. superj from g-town Says:

    download latest version of safari from http://www.apple.com/safari/download/
    seems to handle facebook easily and is a pretty quick fix,but you will need to download the FLASH plug-in from here and install it,very very easy!
    works so much better for me,im using windows xp sp3 with all updates.

  19. Evgeny Says:

    Good post, and I completely agree.
    They should somehow concatenate this stuff, and make it more “browser cache” friendly. Since even with this multitude of javascripts/stylesheets they have — it is still being served in a way that each request gets a new file. And the browser cache (especially firefox) does not store it for faster loads in the future.

  20. Ryan Says:

    Useless post, thanks for nothing and the waste of time!

  21. kyussmondo Says:

    A good solution is using a browser that handles javascript faster and renders pages quicker. I believe the quickest are Safari and Google Chrome. Firefox and Opera are also good alternatives. The site does need a redesign, however most Web 2.0 sites now use Javascript AJAX etc, so the browser will make a difference.

  22. hp Says:

    seriously facebook needs to sort it shit out!! – it worked just fine to begin with and it was easier to use and then they had to go and change it all and make it all sh**t and complicated resulting in it not f&^%kin working at all! SO frustrating!!

  23. wafa Says:

    No one yet gave a solution,waste of time.

  24. Bryan Ruiz Says:

    Looks like its a DNS to me. Once the IP is cached locally, the page loads at an OK response time.

    Try this: and see how fast it loads.

    dig facebook.com

    ; <> DiG 9.5.0-P1 <> facebook.com
    ;; global options: printcmd
    ;; Got answer:
    ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 25316
    ;; flags: qr rd ra; QUERY: 1, ANSWER: 2, AUTHORITY: 0, ADDITIONAL: 0

    ;facebook.com. IN A

    facebook.com. 2359 IN A
    facebook.com. 2359 IN A

    ;; Query time: 22 msec
    ;; SERVER:
    ;; WHEN: Thu Dec 4 17:26:44 2008
    ;; MSG SIZE rcvd: 62

  25. Craig Says:

    Yeah i am getting the same problem with facebook. The problem is that this morning i was on facebook (At Parents Place) and it wasn’t having any problems using it (On IE).

    This afternoon I arrived back at my place and hopped back on (through Firefox) and it is not working at all.

    Cannot use IE on my system as it just locks up. I was on Facebook at my place 2 days ago chatting to a friend , no problems that day, but today Facebook is driving me crazy.


  26. sarah lee Says:

    yeah… same problem we may know.. the Facebook is too damn slow now days. IE or Firefox cant fix this. Where the hell their geek man? facebook doenst have any engineer to fix this???

  27. jeannine Says:

    ok – – I at least feel better that it’s not just me…. I switched internet providers party (like 20%) because of this. I have a T1 at the office and Facebook is fine….. but COME ON!!! I mean a 2-3 second lag on typing when I’m on here at home?

  28. dhar Says:

    damn slow

    to many uselessssssssssssssss aplication !
    AND tom many ‘crazy’ persons playing game on it
    not for social community anymore :(

  29. TITIT Says:

    facebook is going dead

  30. Lord Austin Says:

    So what is the easy fix ?

  31. The man Says:

    I know an easy way that worked for me.. change web browser. IE was super slow, but when I changed to Mozilla Firefox it worked fine!

  32. joemama Says:

    The answer is Akamai. Simple as that.

  33. Megs Says:

    Bryan, that link you suggested got me to facebook’s home page just fine but I tried to log in and it said “page load error”.

  34. Ledlincoln Says:

    No, what I’m seeing is not a DNS issue; it looks like the FB Javascript getting bogged down. I can type a few words of my status or a comment, and watch it appear on the screen, letter by letter, perhaps one letter every two seconds. Now that’s painful! (I’m using Firefox.)

  35. cherokee Says:

    Absolutely pathetic Facebook, get your act together for goodness sake. The Home page does not load period. Not using IE which is crap anyway but Safari browser which works excellent at all other sites except yours. Are you getting the message Facebook web techs, leave out the technical rubbish and just make it LOAAAAAAAAAAD.

  36. geneskipabinskie Says:

    My acc on Facebook was disabled. =.=” And before that Facebook was loading pretty slow. When my account got cancelled I tried creating another one but unfortunately FB runs too slow that I couldn’t even edit the personal infos on my new account. FML.

  37. jianhui Says:

    best solution i found… go change your cache size to 50 or more and it will immediately fasten up!

  38. jianhui Says:

    easiest solution. Just go and change your cache size limit to 50mb or higher and the fb will load faster.

  39. sandrar Says:

    Hi! I was surfing and found your blog post… nice! I love your blog. :) Cheers! Sandra. R.

  40. angelina jolie Says:

    I love your site. :) Love design!!! I just came across your blog and wanted to say that Iíve really enjoyed browsing your blog posts. Sign: ndsam

  41. cyclephil Says:

    just keep hitting the refresh button, usually takes one or two hits… then the page comes up fast.

  42. dee Says:

    I think it’s time for someone with a bigger brain to put facebook out of business! and twitter is not the

  43. real fix! Says:

    lite.facebook.com it works!

  44. bill bob Says:

    arghhhhhhhhhhhh i cant even get into my home page.

  45. marvel Says:

    maybe u all r using the wrong browser – try seamonkey – loading fb wuz so fast – the probs is with loading the game here – n they (the gaming provider) apologized in advance too

  46. noun Says:

    I have no problems at all……my wife is going nuts because facebook is running slow for her. Her computer is more powerful than mine. I am running google chrome…..she is on IE. She won’t stop complaining long enough for me to download Chrome for her

  47. jawad Says:

    useless post,