WordPress.org

Ready to get started?Download WordPress

Forums

Any hack to get rid of prototype.js? (7 posts)

  1. manunkind
    Member
    Posted 6 years ago #

    I'm sorry...but prototype.js is a bloated waste and I would love to completely remove the need for it and gain about 75% of my loading time back. I've tried the various compression methods that I've read on various other blogs with little success. No matter what I do I cannot get rid of it or reduce it's size.

    How about a "WordPress Lite" version or plugin/hack that does not use it and will give everybody back their speedy load times that WP should have?

  2. manunkind
    Member
    Posted 6 years ago #

    I just read that it should only be loading on the Admin pages. What would cause my site to load it on every single page? I can't see it called anywhere in my theme.

  3. whooami
    Member
    Posted 6 years ago #

    it might not be called directly (by name) from your theme. it could be using a hook. Unless its changed, the hook for stuff getting loaded into the admin header, is admin_header or admin_head -- something like that.

    if your theme is using that, that might be the cause.

  4. manunkind
    Member
    Posted 6 years ago #

    The only thing it loads is wp_head(). That's where it pulls in prototype.js.

  5. manunkind
    Member
    Posted 6 years ago #

    Found it. It's used in a plugin that I would have never guessed. A plugin called Optimize DB uses it and loads it on every single page.

  6. S.K
    Member
    Posted 6 years ago #

    No manunkind, it loads even without that particular plugin.

    As whooami mentioned, it is called by a hook in the main wp scripts.

    I am able to locate it, but do not know how to prevents its inclusion.

    Some wp experts over here may kindly help. It is needed only for admin pages.

    S.K

  7. Samuel Wood (Otto)
    Tech Ninja
    Posted 6 years ago #

    Prototype is needed by scriptaculous, which is needed by various scripts WordPress uses in the admin pages.

    In WordPress 2.5, most of these have been migrated to jQuery instead, so it will not load on every admin page unless that page actually needs it or some plugin is forcing the issue.

Topic Closed

This topic has been closed to new replies.

About this Topic