Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7672489
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T16:17:49+00:00 2026-05-31T16:17:49+00:00

I’m using the Recommendations plug on my site and it’s really slow to load,

  • 0

I’m using the Recommendations plug on my site and it’s really slow to load, mostly with Firefox.

I find most FB plugins seem to have this problem. Is it due to the iFrame they create, there seems to be a lot of data being created by the plugin.

Would it be better to make my own JS verson?

If so, does anyone have any pointers to access the same data via an FQL/AJAX call?

Following comments below, I thought I’d explain exactly what I’m doing, I’m loading the plugins dynamically using the script below. Currently only displaying the recommendations plugin, but eventually all those mentioned will be included.

HOWEVER… I’ve noticed this problem even when directly injecting the plugin to a page.

$(document).ready(function () {
addFBelements();
});

 //==== THIS GENERATES SOCIAL ELEMENTS ====
 function addFBelements() {
     window.fbAsyncInit = function () { // sets up asynchronous loading of FB elements
         FB.init({ // initialise FB
             appId: 'MYAPPID',
             status: true, // check login status
             cookie: true, // enable cookies to allow the server to access the session
             xfbml: true,  // parse XFBML
             oauth: true
         });
     };

     (function () {
         if ($("#fb-root").length <= 0) {
             $('body').prepend('<div id="fb-root"></div>'); // add FB div to top of page if not already there
         };
         var e = document.createElement('script'); // load the Facebook Javascript file
         e.src = document.location.protocol + '//connect.facebook.net/en_US/all.js';
         e.async = true;
         document.getElementById('fb-root').appendChild(e);
         $.getScript(document.location.protocol + '//apis.google.com/js/plusone.js'); // Load Google Plus files
         $.getScript(document.location.protocol + '//platform.twitter.com/widgets.js'); // load Twitter files
         renderButtons(); // render the buttons in the page
     } ());
 };
 // ends setting up of FB/Twitter etc links and JS files

 // add Social elements to the pages where required with correct sharing URLs
 function renderButtons() {
     var linkUrl = window.location.href;

     if ($('.googlePlus').length > 0) {
         $('.googlePlus').html('<g:plusone href="' + linkUrl + '" size="medium" style="float:right"></g:plusone>');
     };
     if ($('.fbLike').length > 0) {
         $('.fbLike').html('<fb:like send="false" href="' + linkUrl + '" layout="button_count" width="80" show_faces="false" font="arial"></fb:like>');
     };
     if ($('.fbSend').length > 0) {
         $('.fbSend').html('<fb:like send="false" href="' + linkUrl + '" layout="button_count" width="80" show_faces="false" font="arial"></fb:like>');
     };
     if ($('.tweet').length > 0) {
         $('.tweet').html('<a href="http://twitter.com/share" data-url="' + linkUrl + '" class="twitter-share-button" data-count="none" data-via="hartnollguitars">Tweet</a></span>')
     };
     if ($('.fbComments').length > 0) {
         $('.fbComments').html('<fb:comments href="' + linkUrl + '" num_posts="3" width="640"></fb:comments>');
     };
     if ($('.fbRecommend').length > 0) {
         $('.fbRecommend').html('<img style="border: none" alt="" src="images/like_us_home.png"><fb:activity recommendations="true" border_color="#000000" font="arial" colorscheme="dark" header="false" height="400" width="220" site="www.hartnollguitars.co.uk"><span>');
     };

 };
 // == END OF SETTING UP SOCIAL NETWORKING ELEMENTS. ====

You can see that script sets up all my FB/Twitter etc elements and inserts them into elements with the respective classes where present.

The appId element is not required for the purposes in question, but I also have an Events secton which shows my FB events and FB login, for both I need the appId for validation.

(just trying to explain that whilst it’s bulky for just displaying recommendations, it is intended to do a lot more!)

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-31T16:17:51+00:00Added an answer on May 31, 2026 at 4:17 pm

    Please don’t put window.fbAsyncInit = function () { inside of jQuery’s $(document).ready(function () { as it will cause mixed results in different browsers under different conditions. See my recent answer here:

    http://facebook.stackoverflow.com/questions/9788273/fblogin-button-not-showing-up-in-firefox-ie-or-opera-but-works-fine-in-chro/9792371#9792371

    I’ve also seen issues with $('.googlePlus').html('<g:plusone in IE8. See: Adding a Google +1 Button after page load in IE 8

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
I have a French site that I want to parse, but am running into
I have thousands of HTML files to process using Groovy/Java and I need to
I have a reasonable size flat file database of text documents mostly saved in
I'm new to using the Perl treebuilder module for HTML parsing and can't figure
That's pretty much it. I'm using Nokogiri to scrape a web page what has
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I have just tried to save a simple *.rtf file with some websites and
I have a jquery bug and I've been looking for hours now, I can't
I am reading a book about Javascript and jQuery and using one of the

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.