Title: prototype.js is evil ;)
Last modified: August 19, 2016

---

# prototype.js is evil ;)

 *  [Bodhipaksa](https://wordpress.org/support/users/haecceity/)
 * (@haecceity)
 * [18 years, 1 month ago](https://wordpress.org/support/topic/prototypejs-is-evil/)
 * Okay, prototype.js is no doubt useful and even essential for the admin area of
   WordPress, but you may find, as I did, that you’re inadvertently slowing down
   your site by a huge amount by using certain plugins that call this massive script.
 * The problem: prototype.js is a whopping 124kb. I found that each page on my site,
   once you added up all the html, css, images, and scripts, was coming in at half
   a megabyte. That’s ludicrous. And half of the size was due to prototype.js. Even
   optimizing this script by stripping out all the whitespace leaves it at 92kb.
 * After doing a little research I found that there were certain plugins that were
   calling this script:
    1. Podpress
    2. Share this
    3. Collapsible Archive Widget
    4. Sociable
 * Now I like Alex King’s Share This plugin, for example, but I had to decide whether
   the annoyance of visitors having to download half a megabyte was balanced by 
   the benefits few people that actually use that plugin. I decided it wasn’t.
 * Two of the other plugins were disabled (I’ve just listed them to be informative).
   The fourth was one I’d just installed but hadn’t started using.
 * I also found that a plugin was adding a call to jquery.js to every page, when
   I only needed it on the home page. So I wrapped that in a conditional tag so 
   it only appears when needed.
 * Anyway, I’d suggest looking in the code view of your browser and seeing if prototype.
   js is being called. If it is, you might want to decide whether fast-loading pages
   are more beneficial to your site’s visitors than the benefits of the plugins 
   you’re using.
 * My pages are now about 40kb (much better than 500kb!) and load very quickly.
 * Anyone else found plugins that call prototype.js?

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

 *  [Justin Tadlock](https://wordpress.org/support/users/greenshady/)
 * (@greenshady)
 * [18 years, 1 month ago](https://wordpress.org/support/topic/prototypejs-is-evil/#post-757077)
 * Many, many plugins use Prototype. If we could just move everything over to jQuery,
   it’d be great because it’s much lighter.
 * The problem usually isn’t that a user is using a plugin that utilizes Prototype.
   The problem is that they’re using plugins that use jQuery, Prototype, MooTools,
   and so on, when they should really only be using one JavaScript library at most.
 * Most users aren’t informed enough to know that this will slow down their site
   considerably.
 *  Thread Starter [Bodhipaksa](https://wordpress.org/support/users/haecceity/)
 * (@haecceity)
 * [18 years, 1 month ago](https://wordpress.org/support/topic/prototypejs-is-evil/#post-757102)
 * _Most users aren’t informed enough to know that this will slow down their site
   considerably._
 * That’s the problem. And that’s why I wanted to post something here so that people
   discovering this mysterious call to prototype.js in their headers would be able
   to get some background information.
 * And so that users can be informed it would be good to know which plugins use 
   that script.
 * _The problem usually isn’t that a user is using a plugin that utilizes Prototype._
 * Whether that’s “the” problem I can’t say, but on my site it was “a” problem. 
   I’m so happy to have my site running well again! I’ll be interested to see what
   effect it has on traffic.
 *  [Jonathon N](https://wordpress.org/support/users/imagiscapeca/)
 * (@imagiscapeca)
 * [17 years, 10 months ago](https://wordpress.org/support/topic/prototypejs-is-evil/#post-757456)
 * My admin post-new page calls BOTH
    wp-includes/js/prototype.js 121 KB wp-includes/
   js/prototype.js?ver=1.6 121 KB
 * and ALSO calls BOTH
    jquery.js 30 KB jquery.js?ver=1.2.6 30 KB ( and jquery.form.
   js 31 KB )
 * How can I find which plugin(s) is(are) calling the redundant scripts?
 * Is prototype essential for the admin area?
 * My public homepage calls
    prototype.js?ver=1.6 121 KB jquery.js?ver=1.2.6 30 
   KB jquery/ui.tabs.js?ver=1.5.1 6 KB jquery/jquery.color.js?ver=2.0-4561 4 KB 
   jquery/ui.core.js?ver=1.5.1 4 KB jquery/jquery.schedule.js?ver=20 3 KB tw-sack.
   js?ver=1.6.1 5 KB
 * Should I replace the call for tw-sack.js with jquery (since I already need to
   call jquery)?
 * Also 378 KB was being downloaded from cocomment:
    cocomment.com/js/integration.
   v2.full.js 179 KB cocomment.com/js/extension.v2.full-2.6.3.505.js 173 KB cocomment.
   com/ClientInitializeServlet?[…] 15 KB cocomment.com/jsm/268441600.536872960-2.6.3.505.
   js 14 KB cocomment.com//js/extender?ignoreGenericPages&[…] 4 KB cocomment.com//
   js/extender?ignoreGenericPages&[…] 4 KB cocomment.com//js/extender?ignoreGenericPages&[…]
   4 KB
 * Removing coComment Enhancer (1.2.3b) saved all these.
 * Thanks. Down with evil.
 *  [Jonathon N](https://wordpress.org/support/users/imagiscapeca/)
 * (@imagiscapeca)
 * [17 years, 10 months ago](https://wordpress.org/support/topic/prototypejs-is-evil/#post-757457)
 * Haecceity wrote
 * > I also found that a plugin was adding a call to jquery.js to every page, when
   > I only needed it on the home page. So I wrapped that in a conditional tag so
   > it only appears when needed.
 * I know the conditional tag “if is_home()”, but if the script is needed on a few
   dozen posts, with more being added occasionally, can conditional tags help? **
   Is there a way to get scripts called only on pages which use the plugin?**
 * Can I get the scripts to load not in wp_head() but in the midst of loading the
   page?
 * For example, I only need these called on a few pages:
    plugins/anarchy_media/
   anarchy_media_player.php?anarchy.js 25 KB plugins/wp-table/tablesort.js 24 KB
   plugins/wp-polls/polls-js-packed.js?ver=2.31 3 KB
 *  [Jonathon N](https://wordpress.org/support/users/imagiscapeca/)
 * (@imagiscapeca)
 * [17 years, 9 months ago](https://wordpress.org/support/topic/prototypejs-is-evil/#post-757471)
 * This is such a cool and important thread. Hey everyone! Read this! (If nothing
   else, read the last two posts by imagiscape)
 *  [rrhobbs](https://wordpress.org/support/users/rrhobbs/)
 * (@rrhobbs)
 * [17 years, 8 months ago](https://wordpress.org/support/topic/prototypejs-is-evil/#post-757473)
 * when I am editing posts on one of my sites lately it takes what seems like FOREVER
   to save, it’s hanging on JQuery and if I view source on my edit page there are
   a considerable number of javascript calls – hope eventually there will be a little
   more law and order in this area… thx
 *  [chewru](https://wordpress.org/support/users/chewru/)
 * (@chewru)
 * [17 years, 2 months ago](https://wordpress.org/support/topic/prototypejs-is-evil/#post-757491)
 * Here’s a really, really, really easy way to reduce the file size.
 * Go to [http://www.scriptalizer.com](http://www.scriptalizer.com) .. upload prototype.
   js .. **it will reduce it 43% just like that.**
 * > Javascript Filesize summary:
   >  Size before: 121.23 KB Size after: 70.91 KB 50.32KB
   > SAVED!
 * Save the file back to your PC.. rename it back to prototype.js.. and overwrite
   your old one .. (backing it up of course).

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

The topic ‘prototype.js is evil ;)’ is closed to new replies.

## Tags

 * [jquery](https://wordpress.org/support/topic-tag/jquery/)
 * [jquery.js](https://wordpress.org/support/topic-tag/jquery-js/)
 * [prototype.js](https://wordpress.org/support/topic-tag/prototype-js/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 7 replies
 * 5 participants
 * Last reply from: [chewru](https://wordpress.org/support/users/chewru/)
 * Last activity: [17 years, 2 months ago](https://wordpress.org/support/topic/prototypejs-is-evil/#post-757491)
 * Status: not a support question

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
