Title: Don&#039;t enqueue jquery when not needed
Last modified: August 31, 2016

---

# Don't enqueue jquery when not needed

 *  [luke.oakes](https://wordpress.org/support/users/lukeoakes/)
 * (@lukeoakes)
 * [10 years, 1 month ago](https://wordpress.org/support/topic/dont-enqueue-jquery-when-not-needed/)
 * I appreciate what this website does in loading jquery from a cdn.
    However, I
   have many pages on my site that don’t require jquery, but it seems the plugin
   enqueues jquery regardless. Is it possible to avoid enqueuing jquery when it’s
   not needed please?
 * [https://wordpress.org/plugins/wp-jquery-plus/](https://wordpress.org/plugins/wp-jquery-plus/)

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

 *  Plugin Author [Zach Schnackel](https://wordpress.org/support/users/zslabs/)
 * (@zslabs)
 * [10 years, 1 month ago](https://wordpress.org/support/topic/dont-enqueue-jquery-when-not-needed/#post-7300229)
 * Hi,
    That sounds like more of a general question around [dequeuing scripts](https://codex.wordpress.org/Function_Reference/wp_dequeue_script),
   correct?
 *  Thread Starter [luke.oakes](https://wordpress.org/support/users/lukeoakes/)
 * (@lukeoakes)
 * [10 years, 1 month ago](https://wordpress.org/support/topic/dont-enqueue-jquery-when-not-needed/#post-7300234)
 * Kind of.
 * Say another plugin/theme enqueues a script that depends on jquery, then jquery
   is enqueued, but if nothing is enqueued that depends on jquery, then jquery isn’t
   enqueued.
 * However, when your plugin is active, jquery is enqueued on every page regardless
   of whether it’s needed or not.
 *  Plugin Author [Zach Schnackel](https://wordpress.org/support/users/zslabs/)
 * (@zslabs)
 * [10 years, 1 month ago](https://wordpress.org/support/topic/dont-enqueue-jquery-when-not-needed/#post-7300235)
 * I can see both sides to that. Sure, it’s probably a waste to load jQuery if you’re
   not using it, but the mere fact that you have this plugin installed means that
   it’s assumed to be used “somewhere”, a vast majority of WordPress plugins depend
   on it anyway, it’s part of the WordPress ecosystem, and also if you’ve loaded
   it on a page already, the caching of that script from these CDNs would make it
   a non-issue on subsequent pages anyway. Seeing how individuals using this plugin
   currently would assume it would be enqueued, I’d need more of a reason to change
   this than what I find to be a very specific scenario that hasn’t come up since
   this has been released.

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

The topic ‘Don't enqueue jquery when not needed’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/wp-jquery-plus.svg)
 * [WP jQuery Plus](https://wordpress.org/plugins/wp-jquery-plus/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wp-jquery-plus/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wp-jquery-plus/)
 * [Active Topics](https://wordpress.org/support/plugin/wp-jquery-plus/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wp-jquery-plus/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wp-jquery-plus/reviews/)

## Tags

 * [dequeue](https://wordpress.org/support/topic-tag/dequeue/)
 * [enqueue](https://wordpress.org/support/topic-tag/enqueue/)
 * [wp_dequeue_script](https://wordpress.org/support/topic-tag/wp_dequeue_script/)
 * [wp_enqueue_script](https://wordpress.org/support/topic-tag/wp_enqueue_script/)

 * 3 replies
 * 2 participants
 * Last reply from: [Zach Schnackel](https://wordpress.org/support/users/zslabs/)
 * Last activity: [10 years, 1 month ago](https://wordpress.org/support/topic/dont-enqueue-jquery-when-not-needed/#post-7300235)
 * Status: not resolved