Support » Plugin: Autoptimize » Defer parsing of JavaScript

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Frank Goossens

    (@futtta)

    JavaScript is only deferable if it is not forced in head. The problem you’re probably facing is that you have (some) javascript that requires to be in head, hence the problem.

    An alternative could be not to “force in head”, but to exclude all javascript that has to be in head one by one from Autoptimization. It might take some trial and error, but it will most certainly help you to defer your aggregated JS (although your excluded JS will still trigger the “defer parsing” message in gtmetrix, obviously)

    hope this help,
    frank

    Thread Starter ben52

    (@ben52)

    Hi Frank,
    i disable force in head and now it’s ok

    one question pls. to inline all css i must enqueue all of them in my child theme ???
    or i can enqueue only my child css
    thanks
    Ben

    Plugin Author Frank Goossens

    (@futtta)

    when using child themes Autoptimize will read the CSS of the child theme and recursively import other CSS (parent CSS + imports in there as well).

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Defer parsing of JavaScript’ is closed to new replies.