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

    (@optimizingmatters)

    as local_ga_js is not a static file but a PHP script that returns the local GA JS, AO is not able to minify that Nico. maybe check with the developer of the plugin that is responsible for local serving of that JS and ask if they can minify it?

    hope this clarifies,
    frank

    Thread Starter nico121

    (@nico121)

    Hey Frank thanks for your reply,

    how can i find whos the developer for local serving for that js? Im kinda new to this all.

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

    (@optimizingmatters)

    well, you’re likely using a plugin to locally cache the GA JS, so it would be the developer of that plugin?

    Thread Starter nico121

    (@nico121)

    Okay so i fixed that, the only issue i have is this now, how can i fix that? I enabled all minify options on JS and CSS but its still 2 more than recommended.

    Plugin Author Optimizing Matters

    (@optimizingmatters)

    well, you _could_ try to aggregate JS & CSS, these are off by default as with HTTP/2 (which 99.9% of sites are on) combining is not always the best strategy so the recommendation in your screenshot is not necessarily correct these days. but try aggregating JS and/or CSS out (assuming those are not on yet) and test if performance indeed is better (using e.g. webpagetest.org or Google’s Pagespeed Insights) ? 🙂

    Thread Starter nico121

    (@nico121)

    Hey again, so i have no more issues so far on the tracking plugin. But when i run the google page speed test it gives me a few red warnings for auto optimize although i have minified css and js:

    “…css/autoptimize_cffef56….css”
    “…css/autoptimize_single_567a2bb….css?ver=170…”
    “…js/autoptimize_f3a8e35….js”
    “/css?family=…”

    How can i further optimize that so it wont give me the red warnings?

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

    (@optimizingmatters)

    depends on what the actual warnings are, can you specify?

    Thread Starter nico121

    (@nico121)

    These 3 warnings show all the css and js issues i mentioned earlier:

    Plugin Author Optimizing Matters

    (@optimizingmatters)

    ok, so for render-blocking CSS have a look at the “eliminate render-blocking CSS” option, but do take into account you’ll have to either;

    a) generate & copy/paste the “above the fold CSS” in the field below (more info in the AO FAQ, look for “inline & defer CSS”) OR
    b) create manual rules on the “critical CSS” tab (generating critical css for each rule) OR
    c) take a subscription over at criticalcss and paste your API in the field on the critical CSS tab

    re. unused code (JS or CSS); AO has no way of knowing what is or what is not used so it cannot remove that. There however is a a premium service that can remove unused CSS (but not JS) that could help. For more info see the Rapidload entry on Autoptimize’s “Optimize More” tab.

    hope this helps,
    frank

    Thread Starter nico121

    (@nico121)

    Another issue i just faced. Once i open the website on my phone, it won’t display the website correctly, however when i’m logged into the site as admin, everything shows correctly. (When i turn off auto optimize it shows everything too)

    How can i fix that

    Plugin Author Optimizing Matters

    (@optimizingmatters)

    you’ll have to do some basic troubleshooting here; try to identify what is breaking things by just disabling CSS or JS or HTML or Image optimization (incl. lazyload). Based on that we can see what the next steps need to be 🙂

    frank

    Thread Starter nico121

    (@nico121)

    I just unchecked and checked it again, clicked on save and clear cache and now it works. So it might be the cache that won’t display it?

    Plugin Author Optimizing Matters

    (@optimizingmatters)

    hard to say, but if this happens again;
    1. describe what specifically is wrong
    1. make a screenshot and share it
    1. check the browser console for possible JavaScript erros

    Thread Starter nico121

    (@nico121)

    I fixed it, it was load JS early. Now it works again i had to uncheck it. Does this slow down my page now?

    Plugin Author Optimizing Matters

    (@optimizingmatters)

    is that “force JS in head”? if so; that option is strongly discouraged, it makes the site slower actually and is only useful in very specific situations really.

Viewing 15 replies - 1 through 15 (of 16 total)

The topic ‘Minify JS Issue’ is closed to new replies.