0

I'm having issues where multiple copies of jQuery are being loaded onto the page via plugins that require jQuery.

I Just want to confirm that if I have 3 plugins active on my page, that all properly use wp_enqueue_script to load jQuery, will the library be included only once or 3 times?

1 Answer 1

5

If all three plugins load jQuery properly using wp_enqueue_script("jquery") then only one copy of jquery will be used.

If you are seeing three copies then some plugins are not playing nice.

2
  • 2
    I'd give an extra +1 for the not playing nice comment. This is one of the biggest end-user annoyances in WordPress. May 8, 2012 at 14:59
  • +1 what Chip said. I cannot say how often I have to deal with both plugins and themes that don't load jQuery "nicely". It's unfortunate that I actually get excited when I see a theme or plugin that is doing it correctly, instead of incorrectly.
    – Pippin
    May 8, 2012 at 16:55

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.