Support » Plugin: Autoptimize » Optimize, Minify & Defer JS not working with Do not aggregate but defer? on?

  • Resolved willjames

    (@willjames)


    Hi
    When looking at the js files loading in developer tools on these pages on this site, there are a number called autoptimize_single_…….. Which I assume are the minified and deferred js files, but there are also many, many other js files that are loaded from their original location, rather than from the AO cache?

    I have the following settings:
    Do not aggregate but defer – checked
    Also defer inline js

    I don’t claim to fully understand this area, but it doesn’t seem right to me.

    Also, have you had any experience of the flying scripts method of delaying selected JS until user interaction? How would that work with AO (If at all)?

    Many thanks for your help

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

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

    (@optimizingmatters)

    when “Do not aggregate but defer” is checked, AO will minify files that are not minified based on the filename, so whatever.min.js will remain in place, whereas another.js will be considered unminified and hence become an autoptimize_single_xyz123.js file.

    re. delaying JS; that might be part of a future “pro” version of AO … πŸ˜‰

    hope this clarifies,
    frank

    Thread Starter willjames

    (@willjames)

    Thanks Frank
    I have another, more general question regarding speed.
    On paper my site broadly ticks all the pagespeed boxes in the lab. Both mobile and desktop receive a good score.

    Google have updated their system and they seem to be using a lot more real world data and this is where we struggle. I feel like I am missing something obvious. Our competition commercialmotor.com and trucklocator.co.uk have much worse optimisation scores than our site truckpages.co.uk yet they have much better real world Chrome User X data.

    We do have a some users in countries with poor infrastructure, but the bulk are in the UK. I am wondering if they do not allow those countries onto their sites or I have missed something obvious?

    I am using AO (2.9.3-beta-2), Critical CSS, Rapidload, WP Super Cache and EWWW for webP.

    I would be grateful for your thoughts on this…

    Plugin Author Optimizing Matters

    (@optimizingmatters)

    So what user data CWV KPI’s are not up to snuff?

    Thread Starter willjames

    (@willjames)

    Hi
    They are the FCP and LCP that are causing the main issues:
    for the domain origin on average they are at 3s each but some pages like this one:https://www.truckpages.co.uk/trucks-for-sale/ are as high as FCP 6.7 and LCP 6.5s

    Thanks

    Plugin Author Optimizing Matters

    (@optimizingmatters)

    Hard to say, but based on the HTML source you have a chunk of inline JS from ewww executing immediately (it’s the first thing be parsed/ executed, even before critical CSS), so at least theoretically this could slow down initial rendering (FCP) and thus also impacting subsequent LCP (which logically is bigger then FCP)?

    Thread Starter willjames

    (@willjames)

    Do you think I would be better without the webP and reverting back to jpg then? Or should I force the webP without the js helper?

    There is a cache from KeyCDN called cache enabler that seems to have a system for serving the webP images without js?

    I assume I would have to replace WP Super cache if I used this however? I have installed it on a dev site and it seems OK (except no preload).

    What is your best experience to serve webP? I use Apache & NGINX proxy with CDN77

    Plugin Author Optimizing Matters

    (@optimizingmatters)

    well obviously (I’m biased) I prefer the way AO does webp/avif switching (also JS, but loaded and executed late and the JS is less bulky) πŸ™‚

    but what I would do if I were you would be to disable ewww’s webp JS helper (check the HTML source to confirm the JS is gone) and wait for some time for the “user data” to update to confirm things get better when that JS is gone. if things don’t get better in 1 months time, you can re-enable it, if things do get better you can consider alternatives?

    Thread Starter willjames

    (@willjames)

    Thanks you – I had just disabled the EWWW JS.

    The sheer number of images that we get through makes the AO option an expensive one!

    We can have an auction inventory advertised with 1000+ entries with 10 images per entry (10 sizes per image) that only last two weeks to be replaced by another…

    Plugin Author Optimizing Matters

    (@optimizingmatters)

    well, Shortpixel (which is the service/ company used by AO’s image opt.) charges for CDN bandwidth these days and not number of images optimized, so the fact you’re regularly replacing images would (should) not matter πŸ™‚

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘Optimize, Minify & Defer JS not working with Do not aggregate but defer? on?’ is closed to new replies.