The Support Forums will be in read-only mode for a scheduled maintenance window on 01 September 2016 14:00 UTC - 20:00 UTC. More information.

Simple Facebook Connect
Slowly Facebook Server, prevent Integration in EVERY site (9 posts)

  1. vielhuber
    Posted 6 years ago #


    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
    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!

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

    Posted 6 years ago #

    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.

  3. vielhuber
    Posted 6 years ago #

    Hi Otto!

    Sorry, but I cannot see this behaviour.

    Its loading, loading and loading.
    And in the left bottom corner there is always standing

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

  4. vielhuber
    Posted 6 years ago #

    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.

  5. vielhuber
    Posted 6 years ago #

    I have proof with using Firebug Network Analyzer:

    59.5 KB

    This was nearly worst case!

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

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

    Posted 6 years ago #

    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.

  7. vielhuber
    Posted 6 years ago #

    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.

  8. vielhuber
    Posted 6 years ago #

    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');
    if($_GET["page"] != "sfc") {
    remove_action('admin_init','sfc_admin_init', 9);

    Login/Registration/Administration works perfectly.

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

    Posted 6 years ago #

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

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic