Lots of XFBML Facebook Like buttons are slow?

后端 未结 4 1890
孤独总比滥情好
孤独总比滥情好 2020-12-23 15:31

See http://running.ph/

It just hangs chrome for a while, while all the buttons load. I\'ve read using IFrame avoids this but I really want to use XFBML JS for all th

4条回答
  •  慢半拍i
    慢半拍i (楼主)
    2020-12-23 16:01

    I had problems with this, too.

    It's Social network's API fault. If you look in Chrome to the NET tab, you'll see that there are 252 requests per page! (Facebook, g+, Twitter, your resources)

    This is part of problem

    loadScriptAsync('//connect.facebook.net/en_US/all.js');
    

    it loads all scripts possible, maybe multiple times without caching. I think there's no chance to avoid this from your side

    OT: Why do you require offline&SMS access when logging on your site? I think nobody wise would like to give you him/her phone number and/or offline access

提交回复
热议问题