• Resolved lenyman

    (@lenyman)


    I’m new with this tool. I was learning about it with a video tutorial in which it mentions the option “Look for scripts only in head?”. But apparently it is no longer in the version of AO that I installed (v.2.2.1).

    I remove “JQuery.js” from the exclusions list and nothing has been broken but the Header (and some small sharing buttons). This Header depends on some in-line script (flexslider) that is in the <body> of the document (line 256).

    I think if I had the option to optimize only the scripts that are in the <head> would solve the problem.
    What do you suggest?
    Thanks in advance.

    The page I need help with: [log in to see the link]

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

    (@optimizingmatters)

    that option indeed has been removed @lenyman, but you can force AO to do so using a filter, as shown in this code snippet;

    add_filter('autoptimize_filter_js_justhead','__return_true');

    hope this helps,
    frank

    Thread Starter lenyman

    (@lenyman)

    Well, that did not solve the problem since flexslider is dependent on JQuery ?? It was my fault, I did not realize it yesterday (but solve the issue with small sharing buttons).
    But I thank you very much for your answer and for your time!
    I will continue to learn how to use this great tool … thanks again.

    PS: just out of curiosity: why did you remove that option?

    • This reply was modified 7 years, 3 months ago by lenyman.
    Plugin Author Optimizing Matters

    (@optimizingmatters)

    PS: just out of curiosity: why did you remove that option?

    not _really_ useful and I added “also aggregate inline”-twin options and want to keep number of options somewhat limited ??

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Look for scripts only in head?’ is closed to new replies.