WordPress.org

Ready to get started?Download WordPress

Forums

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

  1. vielhuber
    Member
    Posted 3 years ago #

    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!

  2. Samuel Wood (Otto)
    Tech Ninja
    Plugin Author

    Posted 3 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
    Member
    Posted 3 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
    http://static.ak.connect.facebook.com/...

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

  4. vielhuber
    Member
    Posted 3 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
    Member
    Posted 3 years ago #

    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.

  6. Samuel Wood (Otto)
    Tech Ninja
    Plugin Author

    Posted 3 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
    Member
    Posted 3 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
    Member
    Posted 3 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');
    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.

  9. Samuel Wood (Otto)
    Tech Ninja
    Plugin Author

    Posted 3 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