• Hello,

    I have jQuery setup to defer. All works fine until I enable Autoptimize. Then, data-wp-stategry=”defer” remains, but the actual defer=”defer” attribute is removed.

    Autoptimize is setup to exclude js/jquery/jquery.min.js. I’ve also tried enabling the “Disable extra compatibility logic?” option, but no luck.

    Any recommendations?

    FWIW, I have this same issue as soon as I enable Wordfence, and a couple of other plugins. It seems that maybe if a plugin enqueues jQuery-reliant JS, and those scripts aren’t set to stategry => defer, WordPress doesn’t defer jQuery. Any way around this?

    Thanks,

    Tim

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

You must be logged in to reply to this topic.