Defer JavaScript (6 posts)

  1. Glen Charles Rowell
    Posted 3 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
    Posted 3 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
    Posted 3 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
    Posted 3 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.

Topic Closed

This topic has been closed to new replies.

About this Topic


No tags yet.