WordPress.org

Support

Support » Plugins and Hacks » [Plugin: Simple Facebook Connect] Slowly Facebook Server, prevent Integration in EVERY site

[Plugin: Simple Facebook Connect] Slowly Facebook Server, prevent Integration in EVERY site

  • vielhuber
    Member

    @vielhuber

    Hello!

    I like the plugin, but it is included in EVERY page.
    I think i need this plugin ONLY in the registration and login forms.
    Even in /wp-admin a lot JS files are loaded from
    http://static.ak.connect.facebook.com/
    This sucks and slows down my whole site.

    What can i do to prevent this?
    I only want to have the plugin activated in register/login pages.

    Thanks in advance!

Viewing 8 replies - 1 through 8 (of 8 total)
  • Plugin Author Samuel Wood (Otto)
    WordPress.org Tech Dude

    @otto42

    Putting the JS code on the whole site doesn’t slow down the site any, really. The JS code is cached in the browser and only loads once, no matter how many pages you put it on.

    Also, considering that many sites across the whole internet use the Facebook code, it’s likely already cached from those other sites.

    vielhuber
    Member

    @vielhuber

    Hi Otto!

    Sorry, but I cannot see this behaviour.

    Its loading, loading and loading.
    And in the left bottom corner there is always standing
    http://static.ak.connect.facebook.com/

    What am i doing wrong?
    I use W3 Total Cache and other plugins;

    vielhuber
    Member

    @vielhuber

    Another argument is that I don’t want to integrate Facebook Files into private backend data. I see that nothing is catched by Facebook but I think it could be a security issue.

    vielhuber
    Member

    @vielhuber

    I have proof with using Firebug Network Analyzer:

    GET XFBML
    http://static.ak.connect.facebook.com/connect.php/de_DE/js/Api/CanvasUtil/Connect/XFBML
    static.ak.connect.facebook.com
    59.5 KB
    37.76s

    This was nearly worst case!

    Simply tell me how to deactivate the plugin enqueue_scripts and enable them only at necessary points.

    Plugin Author Samuel Wood (Otto)
    WordPress.org Tech Dude

    @otto42

    Sounds like a personal problem to me, my browser pulls all those scripts in less than 40ms.

    You cannot remove the scripts without breaking the plugin. That’s what the base plugin is designed to do: add the necessary scripts.

    Perhaps you should use another plugin, or consider rolling your own. The point of SFC is that it includes several different pieces, and most people want to use more than one of them. Making independent FB plugins work together is difficult at best.

    vielhuber
    Member

    @vielhuber

    Perhaps it is that i come from germany and the serving connection from the facebook servers are not as good as at your place.

    I try to modify your plugin by myself, this couldn’t be so difficult.
    Then I bring up my results here.

    Thanks for your time, Otto.

    vielhuber
    Member

    @vielhuber

    It was easier than i thought:

    If you only need the plugin on your Login/Register Pages and want to prevent, that it is loaded EVERYWHERE on your page (even in private backend data), simply add this snippet to your functions.php:

    remove_action(‘wp_enqueue_scripts’, ‘sfc_featureloader’);
    remove_action(‘admin_footer’,’sfc_add_base_js’);
    if($_GET[“page”] != “sfc”) {
    remove_action(‘admin_init’,’sfc_admin_init’, 9);
    }

    Login/Registration/Administration works perfectly.

    Plugin Author Samuel Wood (Otto)
    WordPress.org Tech Dude

    @otto42

    That will break the Facebook login connector on the user profiles page.

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘[Plugin: Simple Facebook Connect] Slowly Facebook Server, prevent Integration in EVERY site’ is closed to new replies.