WordPress.org

Ready to get started?Download WordPress

Forums

Defer JavaScript (6 posts)

  1. a4jp.com
    Member
    Posted 2 years ago #

    Can you make WordPress defer more of the JavaScript that loads to speed up our sites and give us an option to defer JavaScript being loaded somehow? A few of my sites are quite slow. I know deleting plugins is probably the easiest method but I need all the plugins I'm using so far.

  2. The plugins should only call the js on the pages that need it, which isn't something we can control.

    However you can use minify plugins to force it, if you want.

  3. PavelS
    Member
    Posted 2 years ago #

    No... Minify JS and using Gzip that is one thing. And Defer loading is other.

    There are no any parameter that able to enqeue script with defer or async parameters.

  4. Actually, PavelS, some of the minification plugins have settings to defer JS loading :)

  5. PavelS
    Member
    Posted 2 years ago #

    Thanks. I think that enqueue script function should be available to control that parameters. It so important as attaching in footer.

  6. southcast
    Member
    Posted 2 years ago #

    Since your post is relevant so I thought I will leave a link to another discussion, wherein I have put in an update you may find useful.
    Cheers.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.