Skip to:
Content
Pages
Categories
Search
Top
Bottom

BP scripts loaded on all sites and pages, why?

  • Hi,

    Here’s a list of all style and script files that are included in the head section of very page on every site in a BuddyPress network:

    
    <link rel='stylesheet' id='bp-admin-bar-css'  href='.../wp-content/plugins/buddypress/bp-core/css/admin-bar.min.css?ver=2.9.1' type='text/css' media='all' />
    <link rel='stylesheet' id='bp-legacy-css-css'  href='.../wp-content/plugins/buddypress/bp-templates/bp-legacy/css/buddypress.min.css?ver=2.9.1' type='text/css' media='screen' />
    
    <script type='text/javascript' src='.../wp-content/plugins/buddypress/bp-core/js/confirm.min.js?ver=2.9.1'></script>
    <script type='text/javascript' src='.../wp-content/plugins/buddypress/bp-core/js/widget-members.min.js?ver=2.9.1'></script>
    <script type='text/javascript' src='.../wp-content/plugins/buddypress/bp-core/js/jquery-query.min.js?ver=2.9.1'></script>
    <script type='text/javascript' src='.../wp-content/plugins/buddypress/bp-core/js/vendor/jquery-cookie.min.js?ver=2.9.1'></script>
    <script type='text/javascript' src='.../wp-content/plugins/buddypress/bp-core/js/vendor/jquery-scroll-to.min.js?ver=2.9.1'></script>
    <script type='text/javascript'>
    /* <![CDATA[ */
    var BP_DTheme = {"accepted":"Accept\u00e9","close":"Fermer","comments":"commentaires","leave_group_confirm":"Voulez-vous vraiment quitter ce groupe ?","mark_as_fav":"Favori","my_favs":"Mes Favoris","rejected":"Rejet\u00e9","remove_fav":"Supprimer le favori","show_all":"Tout afficher","show_all_comments":"Afficher tous les commentaires de cette discussion","show_x_comments":"Afficher tous les commentaires (%d)","unsaved_changes":"Votre profil contient une ou plusieurs informations non sauvegard\u00e9es. Si vous quittez cette page sans les enregistrer, ellles seront perdues.","view":"Afficher"};
    /* ]]> */
    </script>
    <script type='text/javascript' src='.../wp-content/plugins/buddypress/bp-templates/bp-legacy/js/buddypress.min.js?ver=2.9.1'></script>
    

    Now, needless to say this hurts page load times and so SEO results badly. Worse is that this applies to every page on every site in the network!

    Now I could understand the buddypress admin bar related stuff, if the admin bar was actually activated. But it all seems to be loaded whether it’s actually needed on that page or not … and whether the related module or options is even activated or not :S

    Apart from the performance impact, I see it actually hurt theme scripts on sites in the network. Like the jquery smooth scroll that is used by Genesis / Agency Pro theme, it just gets overruled and rendered useless by the activity feed / scrollto scripts.

    IMHO these should ONLY be loaded on the activity page or other BP pages, or if any of the BP widgets (do any of them need extra assets?) are used… And even then, not way up in the header if at all possible.

    Why is it implemented as it is now? Convenience or actual necessity?

    Thanks for any clarification or thoughts 🙂

  • You must be logged in to reply to this topic.
Skip to toolbar