Advertisement
androidpro99

FB script 2015!! for non blocking javascript !

Mar 31st, 2015
217
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. Is putting script at the bottom of the page enough for non blocking Javascript?
  2.  
  3. 0
  4. down vote
  5. favorite
  6. I'm wondering if putting the script tag to load Facebook sdk js is good enough or should I leverage async script that Facebook provides
  7.  
  8. For example this is how I load Facebook sdk js right now in WordPress .
  9.  
  10. <?php wp_enqueue_script( 'facebook-api', '//connect.facebook.net/en_US/sdk.js#xfbml=1&appId=' . $app_id . '&version=v2.0' ); ?>
  11. It results in putting the <script> tag at the bottom of the page. Or do I have to do this which is suggested by Facebook? I wonder what the difference is in terms of performance?
  12. ............................
  13. the script on mediafire :
  14. http://bit.ly/1CHA5kY
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement