Title: A plugin to detect javascript duplicates?
Last modified: August 18, 2016

---

# A plugin to detect javascript duplicates?

 *  [googlebot](https://wordpress.org/support/users/googlebot/)
 * (@googlebot)
 * [18 years, 6 months ago](https://wordpress.org/support/topic/a-plugin-to-detect-javascript-duplicates/)
 * I have few plugins active and I noticed that some of them add to the header the
   same javascript multiple times, for instance, I have scriptacolous referenced
   3 times by 3 different plugins. Wouldn’t that slow down a bit the loading time?
   
   Is that a normal behavior?
 * So, I was wondering if there is any plugin to do a clean up in the header, detects
   any javascript duplicate and removes it.
 * Thanks

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

 *  Moderator [Samuel Wood (Otto)](https://wordpress.org/support/users/otto42/)
 * (@otto42)
 * WordPress.org Admin
 * [18 years, 6 months ago](https://wordpress.org/support/topic/a-plugin-to-detect-javascript-duplicates/#post-656119)
 * WordPress itself eliminates these duplicates, in the latest versions. Of course,
   this is assuming that these plugins are correctly using the WP_Script functions.
 * Basically, a plugin can add a javascript to WordPress, tell it what dependencies
   the script has (on other scripts), etc. Like if you have a JS that needs scriptaculous,
   you can add that script and tell WordPress that it needs scriptaculous. Then,
   you can “enqueue” it when you need it. WordPress will automatically output the
   necessary script tags to load the script into the page, along with it’s dependencies.
 * In other words, tell the plugin authors to fix their plugins to use the new WordPress
   functionality that was developed specifically to prevent this sort of thing. 
   Scriptaculous and jQuery are both included in the latest WordPress, they don’t
   need to be including them with their plugins anymore, they should use the existing
   versions by using the wp_enqueue_script functionality.
 * Also, if you find a plugin that is not using this functionality and is loading
   it’s own javascript directly, then please post it and tell everybody, because
   this means that it’s likely *not* wholly compatible with the latest versions 
   of WordPress (2.2 and up).
 *  Thread Starter [googlebot](https://wordpress.org/support/users/googlebot/)
 * (@googlebot)
 * [18 years, 6 months ago](https://wordpress.org/support/topic/a-plugin-to-detect-javascript-duplicates/#post-656122)
 * Awesome, thanks.
 *  Moderator [Samuel Wood (Otto)](https://wordpress.org/support/users/otto42/)
 * (@otto42)
 * WordPress.org Admin
 * [18 years, 6 months ago](https://wordpress.org/support/topic/a-plugin-to-detect-javascript-duplicates/#post-656129)
 * Since it’s not documented particularly well, I added some starter documentation
   to the codex, so that people can figure out how to use the scripts functionality:
   
   [http://codex.wordpress.org/Function_Reference/wp_enqueue_script](http://codex.wordpress.org/Function_Reference/wp_enqueue_script)
 *  [Jonathon N](https://wordpress.org/support/users/imagiscapeca/)
 * (@imagiscapeca)
 * [18 years, 2 months ago](https://wordpress.org/support/topic/a-plugin-to-detect-javascript-duplicates/#post-656307)
 * I can see which scripts are called, but I can’t see which plugins are calling
   them!
 * How can I find which plugin is calling the script?
 * I have Firefox Extensions:
    - JSView (!)
    - Web Developer
    - Firebug
    - ViewSourceWith
    - View Source Chart
 * I hope to find not only which plugins call jsquery, but ALSO which call it in
   the wrong way that leads to duplicate loads.
 * If I search all my plugins’ code, is there a tell-tale sign of incorrect code?
 * Thanks
 *  [Jonathon N](https://wordpress.org/support/users/imagiscapeca/)
 * (@imagiscapeca)
 * [18 years, 1 month ago](https://wordpress.org/support/topic/a-plugin-to-detect-javascript-duplicates/#post-656312)
 * Still seeking …

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

The topic ‘A plugin to detect javascript duplicates?’ is closed to new replies.

 * 5 replies
 * 3 participants
 * Last reply from: [Jonathon N](https://wordpress.org/support/users/imagiscapeca/)
 * Last activity: [18 years, 1 month ago](https://wordpress.org/support/topic/a-plugin-to-detect-javascript-duplicates/#post-656312)
 * Status: not a support question

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
