...

View Full Version : Resolved facebook js speed up



Trki
12-06-2012, 08:26 PM
Hello,

I was looking work some boost to load speed of this script

<div id="fb-root"></div>
<script>(function(d, s, id) {
var js, fjs = d.getElementsByTagName(s)[0];
if (d.getElementById(id)) return;
js = d.createElement(s); js.id = id;
js.src = "//connect.facebook.net/en_GB/all.js#xfbml=1";
fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));</script>

<div class="fb-like-box" data-href="https://www.facebook.com/page" data-width="200" data-height="100" data-show-faces="false" data-stream="false" data-header="false"></div>

But somehow i found nothing usefull and the page load time is really a killer... Do you know some tricks? :/ I would be extremly grateful :)

DanInMa
12-07-2012, 03:58 PM
theres not much you can do. you are adding a remote script to the page so its dependent upon the clients connection speed to that external source.

Trki
12-07-2012, 05:06 PM
theres not much you can do. you are adding a remote script to the page so its dependent upon the clients connection speed to that external source.

Hm ah :/ but its so slow, isn't there any way?

DanInMa
12-07-2012, 07:33 PM
not really. the code makes many http requests adn they dont have it on a CDN that I could find. here is a recent article that discusses some of this : http://www.codeproject.com/Tips/353983/Adding-the-Facebook-Like-Button-to-a-Website

Trki
12-07-2012, 08:43 PM
not really. the code makes many http requests adn they dont have it on a CDN that I could find. here is a recent article that discusses some of this : http://www.codeproject.com/Tips/353983/Adding-the-Facebook-Like-Button-to-a-Website

I love you... add me on facebook i will send u some money if u want ...

DanInMa
12-07-2012, 11:00 PM
I love you... add me on facebook i will send u some money if u want ...

the article was helpful? that's awesome! :thumbsup: no money needed :) jsut hit the little thank button :cool:

Trki
12-07-2012, 11:47 PM
the article was helpful? that's awesome! :thumbsup: no money needed :) jsut hit the little thank button :cool:

added added

But i have a question + one trick for you, if you could add me on fb:

https://www.facebook.com/lukas.lukac



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum