Title: Avoid loading scripts on non-articles pages?
Last modified: August 21, 2016

---

# Avoid loading scripts on non-articles pages?

 *  Resolved [Bike](https://wordpress.org/support/users/bike/)
 * (@bike)
 * [12 years ago](https://wordpress.org/support/topic/avoid-loading-scripts-on-non-articles-pages/)
 * Hi, I checked a theme with BP and Social Articles switched on on GT Metrix and
   noticed that on every page at least 5 SA javascripts are loaded and likely a 
   lot of other scripts/css as well.
 * wp-content/plugins/social-articles/assets/css/stylesheet.css?ver=20130108
    wp-
   content/plugins/social-articles/assets/js/advanced.js?ver=3.9 wp-content/plugins/
   social-articles/assets/js/ajaxupload.js?ver=3.9 wp-content/plugins/social-articles/
   assets/js/jquery.tmpl.min.js?ver=3.9 wp-content/plugins/social-articles/assets/
   js/social-articles.js?ver=3.9 wp-content/plugins/social-articles/assets/js/wysihtml5-
   0.3.0.min.js?ver=3.9
 * (this was on a search result page!)
 * Is there a way to prevent this? The scripts should only load on actual SA pages,
   not on every page load, saving load times and increasing speed.
 * Thanks!
 * [https://wordpress.org/plugins/social-articles/](https://wordpress.org/plugins/social-articles/)

Viewing 4 replies - 1 through 4 (of 4 total)

 *  Plugin Author [Broobe](https://wordpress.org/support/users/broobe_dev/)
 * (@broobe_dev)
 * [12 years ago](https://wordpress.org/support/topic/avoid-loading-scripts-on-non-articles-pages/#post-4849939)
 * Hi! I will add the validation to enqueue the scripts only in Social Articles 
   pages.
    Thanks for the suggestion! Best Regards, Miguel.
 *  Thread Starter [Bike](https://wordpress.org/support/users/bike/)
 * (@bike)
 * [12 years ago](https://wordpress.org/support/topic/avoid-loading-scripts-on-non-articles-pages/#post-4850069)
 * Gracias Miguel, looking forward to an updated version.
    I have it currently disabled
   due to the 110kb+ extra page load on every page of the site.
 * See also the examples on [http://codex.wordpress.org/Function_Reference/wp_enqueue_script](http://codex.wordpress.org/Function_Reference/wp_enqueue_script)(
   there might be other ways as well).
 * Gracias y saludos,
    Bike
 *  Plugin Author [Broobe](https://wordpress.org/support/users/broobe_dev/)
 * (@broobe_dev)
 * [11 years, 11 months ago](https://wordpress.org/support/topic/avoid-loading-scripts-on-non-articles-pages/#post-4850082)
 * Hi! The next version should be ready in a couple of weeks! Sorry for the big 
   delay…
 * Saludos! 😉
 *  Plugin Author [Broobe](https://wordpress.org/support/users/broobe_dev/)
 * (@broobe_dev)
 * [11 years, 8 months ago](https://wordpress.org/support/topic/avoid-loading-scripts-on-non-articles-pages/#post-4850106)
 * Done! 😉

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘Avoid loading scripts on non-articles pages?’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/social-articles_bebebf.svg)
 * [Social Articles](https://wordpress.org/plugins/social-articles/)
 * [Support Threads](https://wordpress.org/support/plugin/social-articles/)
 * [Active Topics](https://wordpress.org/support/plugin/social-articles/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/social-articles/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/social-articles/reviews/)

 * 4 replies
 * 2 participants
 * Last reply from: [Broobe](https://wordpress.org/support/users/broobe_dev/)
 * Last activity: [11 years, 8 months ago](https://wordpress.org/support/topic/avoid-loading-scripts-on-non-articles-pages/#post-4850106)
 * Status: resolved