• Resolved Will Stocks

    (@willstockstech)


    Hey Frank
    Love the plugin! It’s defo a life saver!
    I’ve noticed though, I’m seeing comments still in the optimized version of JS and CSS files? Is there a reason these are retained?

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

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

    (@optimizingmatters)

    glad to have saved your life willstocks_tech 😉

    but to answer your question; there are 2 things going on:
    * files that are already minified (as indicated by filename ending in .min.js or -min.js -or .css -) are not re-minified (to avoid unneeded CPU-load and wait time).
    * files that are not minified, are minified, but the minifiers honour “important” comments that contain license information.

    if you want you can always hook into AO’s filter to do additional cleanup. there’s example code in this forum-topic.

    hope this clarifies,
    frank

    Thread Starter Will Stocks

    (@willstockstech)

    Ahhh, OK yep now that makes sense! It’s only the licence comments that remain.

    I’m not going to bother stripping them out tbh, as in my case I’m looking at 400B absolute maximum! What I might do though is look through the already minified files, to see if I could reminify for any savings there.

    Is there a way to list the files that AO is concating rather than me trying to work it out manually?

    Plugin Author Optimizing Matters

    (@optimizingmatters)

    What I might do though is look through the already minified files, to see if I could reminify for any savings there.

    would advice against that tbh, as each plugin/ theme update will quash your changes 🙂

    Is there a way to list the files that AO is concating rather than me trying to work it out manually?

    not automatically, but again there’s a filters you could hook into to log files to the error-log. but I would just have a look at the HTML source of a non-optimized page (by adding ?ao_noptimize=1 to the URL) 😉

    Thread Starter Will Stocks

    (@willstockstech)

    Ahh sorry yeah I meant static JS (such as my own, or my child theme, or external that I know won’t change) 🙂

    Perfecto, that’ll do for now – I can go through the waterfall with ?ao_noptimize=1 and without and compare.

    I’ll remind myself in future to RTFM before popping a question up 😉

    Plugin Author Optimizing Matters

    (@optimizingmatters)

    I’ll remind myself in future to RTFM before popping a question up 😉

    no problemo Will! 🙂

    Oh and feel free to leave a review of the plugin and support here! 🙂

    frank

Viewing 5 replies - 1 through 5 (of 5 total)

The topic ‘Comments still in optimized JS file?’ is closed to new replies.