Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 7 of 7
  1. #1
    Regular Coder
    Join Date
    Jan 2012
    Location
    Slovakia
    Posts
    111
    Thanks
    9
    Thanked 0 Times in 0 Posts

    facebook js speed up

    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
    Last edited by Trki; 12-07-2012 at 11:48 PM.

  • #2
    Senior Coder DanInMa's Avatar
    Join Date
    Nov 2010
    Location
    Salem,Ma
    Posts
    1,577
    Thanks
    13
    Thanked 248 Times in 248 Posts
    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.

  • #3
    Regular Coder
    Join Date
    Jan 2012
    Location
    Slovakia
    Posts
    111
    Thanks
    9
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by DanInMa View Post
    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?

  • #4
    Senior Coder DanInMa's Avatar
    Join Date
    Nov 2010
    Location
    Salem,Ma
    Posts
    1,577
    Thanks
    13
    Thanked 248 Times in 248 Posts
    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/3539...n-to-a-Website

  • Users who have thanked DanInMa for this post:

    Trki (12-07-2012)

  • #5
    Regular Coder
    Join Date
    Jan 2012
    Location
    Slovakia
    Posts
    111
    Thanks
    9
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by DanInMa View Post
    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/3539...n-to-a-Website
    I love you... add me on facebook i will send u some money if u want ...

  • #6
    Senior Coder DanInMa's Avatar
    Join Date
    Nov 2010
    Location
    Salem,Ma
    Posts
    1,577
    Thanks
    13
    Thanked 248 Times in 248 Posts
    Quote Originally Posted by Trki View Post
    I love you... add me on facebook i will send u some money if u want ...
    the article was helpful? that's awesome! no money needed jsut hit the little thank button

  • #7
    Regular Coder
    Join Date
    Jan 2012
    Location
    Slovakia
    Posts
    111
    Thanks
    9
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by DanInMa View Post
    the article was helpful? that's awesome! no money needed jsut hit the little thank button
    added added

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

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


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •