Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Paris Holley

    (@parisholley)

    not sure what you mean by “async” cannot be handled by every browser? otherwise it surely cannot handle “defer”. head.js is already “deferring” the loading (except the inclusion of head.js itself) using some of the methods outlined in that link. the downside of “defer” is that it doesn’t do dependency management.

    Thread Starter dEM0nsTAr

    (@dem0nstar)

    I am referring to the compatibility in browsers: https://www.sitepoint.com/non-blocking-async-defer/

    Plugin Author Paris Holley

    (@parisholley)

    from that perspective, <script async /> does not guarantee execution order and also doesn’t provide dependency management, head.js does. its possible that settings could be added to admin to use traditional script tags with async/defer that can be defined based on the script ‘name’ (used by wordpress). the cost of head.js is already introduced for other scripts, so I do not see much value in using both. WordPress already has some level of dependency sorting, so it is best to leverage that. Alternatively, the plugin could have a switch to use defer/async instead of head.js, but that would require some testing to see if it is even plausible. If I am bored, I will look into it, otherwise feel free to contribute on github.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Does it support "defer" also?’ is closed to new replies.