• Resolved fkoomek

    (@fkoomek)


    Hello.
    Is it possible to agregate also jquery.min.js?

    I tried all of this :
    “Starting from AO 2.1 WordPress core’s jquery.min.js is not optimized for the simple reason a lot of popular plugins inject inline JS that is not aggregated either (due to possible cache size issues with unique code in inline JS) which relies on jquery being available, so excluding jquery.min.js ensures that most sites will work out of the box. If you want optimize jquery as well, you can remove it from the JS optimization exclusion-list (you might have to enable “also aggregate inline JS” as well or switch to “force JS in head”).”

    And not working.
    Thanks.

    Radan

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

    (@optimizingmatters)

    what happens if you disable “aggregate JS” and instead activate “don’t aggregate but defer” + “also defer inline JS” koomek ?

    Thread Starter fkoomek

    (@fkoomek)

    It significantly decreases my Google score.
    I just recently noticed that for example WP-Optimize also aggregate jquery.min.js and that it can improve performance.

    • This reply was modified 1 year, 11 months ago by fkoomek.
    Plugin Author Optimizing Matters

    (@optimizingmatters)

    strange; if non-aggregated JS is deferred, the score _should_ not be worse.

    if jquery is excluded even if it is not in the exclusion list, then that is likely due to AO’s “compatibility” logic, you can disable it with below code snippet;

    
    add_filter( 'autoptimize_filter_init_compatibility', '__return_false' );

    hope this helps,
    frank

    Plugin Author Optimizing Matters

    (@optimizingmatters)

    No feedback so I assume this got resolved fkoomek ? Feel free to follow up if you still encounter issues!

    have a nice day!
    frank

    Thread Starter fkoomek

    (@fkoomek)

    Hi, Frank.
    Your solution, unfortunately, didn’t work.  jquery.min.js is still loaded separately.
    I wanted to make some more testing but didn’t have time yet.

    Radan

    Plugin Author Optimizing Matters

    (@optimizingmatters)

    hmm, in that case (jquery not excluded in the settings and compat. mode off) it is likely that another plugin (or the theme) is using AO’s API to tell AO not to aggregate jquery.min.js.

    Thread Starter fkoomek

    (@fkoomek)

    Thanks!
    I will investigate.

    Radan

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Aggregate jquery.min.js’ is closed to new replies.