Take the 2-minute tour ×
Webmasters Stack Exchange is a question and answer site for pro webmasters. It's 100% free, no registration required.

I installed the Facebook Like button Javascript version on my website on December 15th. Take a look at this report from Google Webmaster Central.

Crawl stats Googlebot activity in the last 90 days alt text

The crawl stats are from Googlebot which as far as I know doesn't execute Javascript. Could the Facebook Like Javascript code, "The XFBML version" be related to large spike in Time spent downloading a page? (By the way the huge spike in November was caused by a mistake where every image request was getting a 301.)
I'm not sure what caused the spike to go down by half somewhere in December. It may have been related to a faulty setting in web.config. I'm at a loss as to what I can do about this or even how to tell if this is my problem or Googlebots crawl problem.

Here is the Facebook code I am using to create the like button. It is right after the opening body tag <div id="fb-root"></div>
<script> window.fbAsyncInit = function() { FB.init({appId: 'xxxxx', status: true, cookie: true, xfbml: true}); };
(function() { var e = document.createElement('script'); e.async = true; e.src = document.location.protocol + '//connect.facebook.net/en_US/all.js'; document.getElementById('fb-root').appendChild(e);
}()); `

and this creates the like box:
<fb:like show_faces="false"></fb:like>

If the Javascript can't be the problem any ideas on where to start looking would be appreciated.

share|improve this question
add comment

4 Answers 4

Assuming you have Firebug or similar available, you should enable the Net tab and take a look at how much stuff is actually involved in making that button happen. (Most such social buttons for that matter.) Here are a couple of blog posts examining this, and for cross-reference a previous SO item bringing up pretty much the same thing. Basically, it's a known problem. There's not too much you can do about it from your end, though also keep in mind that graph you included is measuring milliseconds.

share|improve this answer
add comment

btw you should put the facebook code just before the closing or body tag not opening. I do not believe this will cause a significant slowness. I use this and it had not slowed my sites. you might want to check something else in your code. you can paste a url for us to see.

share|improve this answer
    
Thanks for replying, the instructions for the FB async script tag were to put it after the opening body tag which is similar to the instructions for the async script tags for Google analytics. I think with asynchronous script the code only executes after the page finishes loading so it doesn't influence page load time. –  donaldthe Jan 7 '11 at 4:38
add comment

Those stats you've included show that your website responsiveness is excellent. Even if your site was responding at the slowest spike on that graph (245ms) it's still very good. I would not worry.

share|improve this answer
add comment

Just to say with this being on so many other sites it's likely that it's already cached by the user when they hit your page so there shouldn't really be any download at all :D

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.