Require plugins to offer script loading options

  1. samjco


    It would be nice if every plugin would allow users to disable loading of scripts automatically by way of a check box thus exposing the dependent scripts needed to work.

    Due to the increasing amount of scripts loaded from plugins, having a toggle will allow developers to decide how to load the plugin scripts manually. Globally or on specific pages.

    This will cut down on how many scripts get loaded on the home page of any WordPress site thus speeding up the site load and performance. Hence, Google site ranks would approve!

    Posted: 4 years ago #
  2. Ipstenu (Mika Epstein)
    Lead Plugin Wrangler

    The plugin devs should only be calling the scripts on pages that actually need the scripts, in order to keep down load. If they're not, please suggest that to them directly so they can improve their code :)

    Posted: 4 years ago #
  3. samjco


    Some dev do, some go all global. This can be tricky, because if a user uses a widget, which can be part of the plugin, it will be called global is some cases.

    Posted: 4 years ago #
  4. Ipstenu (Mika Epstein)
    Lead Plugin Wrangler

    Yes, but in that case the code must be called on every page load or it won't work :)

    Posted: 4 years ago #
  5. samjco


    Yes, so having this requested option will allow developers to:

    1. Know what js files are being used.

    2. The option of disabling them from being registered with WordPress and allow them to manually call them.

    I can only tell you how many conflicts I run into with plugins. And trying to contact the plugin developers to let me know what js are being used for what. I even paid for premium plugin just to be let down. Having this as a norm for plugin developers will allow us devs to really fixed conflicts that may occur. Especially when using AJAx for page loading.

    Posted: 4 years ago #
  6. Ipstenu (Mika Epstein)
    Lead Plugin Wrangler

    Which 'devs' are you talking about?

    1) Plugin authors know what THEY are including.

    2) You should always register your JS with WP so that if one plugin registers, you only have to load it once. That's the whole idea of enqueuing the code in the first place, to make sure it only gets called once.

    For most users, disabling auto-loading of scripts is something they should never consider. People who are debugging conflicts would want this, but that's something else. it's why, as a plugin dev, when someone says code isn't working, I ask "What plugins are you using?" It's so I can recreate the problem and find the conflicts and do my best to fix them.

    But the devs already have the ability to load on separate pages. We don't do it right all the time, but that's your real fix :) Enqueue properly.

    Posted: 4 years ago #
  7. johnburns87

    I believe this plugin will solve your question

    + activate/deactivate plugin scripts/styles per page

    + activate/deactivate theme scripts/styles per page

    + re-order scripts/styles per page

    I hope this helps :)

    Posted: 3 years ago #

RSS feed for this topic


You must log in to post.

  • Rating

    1 Vote
  • Status

    Sorry, not right now