Support » Plugin: Autoptimize » We were using the CCSS “defer JS” feature…

  • Resolved bcupham

    (@bcupham)


    Hi,

    We are currently using the Critical CSS setting “Defer jQuery and other non-aggregated JS-files? (deprecated)”. I understand this setting will be removed in the future.

    We actually want to turn this off, but only for some scripts. Specifically, A/B testing scripts need to be non-deferred, non-async. We just realized that we had been deferring our A/B testing scripts all this time, which explains some weird behavior.

    My question is: Is it possible to exclude 3rd party scripts from deferring? Ie, if we have a script call in the head like <script src="somethirdparty.js"></script> can I target just that script to load render blocking?

    And, what is the difference between the CCSS defer setting and the new “Do not aggregate but defer” setting?

    I am a little confused as to how all the different async/defer settings work together.

    Thank you,
    Ben

Viewing 8 replies - 1 through 8 (of 8 total)
  • Plugin Author Optimizing Matters

    (@optimizingmatters)

    the Critical CSS setting “Defer jQuery and other non-aggregated JS-files? (deprecated)” does not have a way to exclude things from being deferred (it’s all or nothing), so you would indeed might be better of with “don’t aggregate but defer JS” + “defer inline JS”, both of which take the exclusions in the JS settings into account Ben.

    hope this clarifies,
    frank

    Thread Starter bcupham

    (@bcupham)

    Hi Frank,

    That does clarify. But just to be clear: The exclusions can include JS hosted elsewhere? My understanding is it is only JS hosted on the same server.

    Thanks,
    Ben

    Plugin Author Optimizing Matters

    (@optimizingmatters)

    The exclusions can include JS hosted elsewhere?

    it should have, but did not due to a little bug which I just fixed in https://github.com/futtta/autoptimize/commit/aa16435346b786f8a07ca22789a3fc838fa4ff24

    would be great if you could download 2.9.2-beta to replace 2.9.1 and take the beta out for a spin to confirm this now works as expected? 🙂

    Plugin Author Optimizing Matters

    (@optimizingmatters)

    Any chance you’ve had the chance to test that beta already @bcupham ? 😉

    Thread Starter bcupham

    (@bcupham)

    I’ll try today. I have to be cautious because the last time we used an AO beta version it ended up in production and took down the site (there were other reasons too)…but I’ll get this up on dev and let you know.

    B

    Plugin Author Optimizing Matters

    (@optimizingmatters)

    but I’ll get this up on dev and let you know

    much appreciated! 🙂

    Thread Starter bcupham

    (@bcupham)

    Hi Frank,

    Yes, it works! I added “try.abtasty.com” to the excluded scripts and it prevented the script from getting a defer attr.

    When do you expect to get this out of beta?

    Thank you,
    Ben

    Plugin Author Optimizing Matters

    (@optimizingmatters)

    Yes, it works! I added “try.abtasty.com” to the excluded scripts and it prevented the script from getting a defer attr.

    super!

    When do you expect to get this out of beta?

    I’ll release one of the following days (maybe tomorrow even, but I’m waiting on feedback from one last tester).

Viewing 8 replies - 1 through 8 (of 8 total)
  • You must be logged in to reply to this topic.