• Resolved minhduc.dev

    (@ducpl)


    Hello, I am using “Autoptimize plugin” and combine all js into one file. But how does your inline js appear after js “Autoptimize”

    For example:
    <script defer src=”/assets/homeV4/js/min.80d3c4a6dfd9a0e2db705a8c2b0d0737.js”></script> <script>Inline JS Simple Custom Css and JS</script>

Viewing 8 replies - 1 through 8 (of 8 total)
  • Plugin Author SilkyPress

    (@diana_burduja)

    If the “Also aggregate inline JS?” option in Autoptimize is enabled, then the inline JS will be pulled into the autoptimize JS file linked at the end of the HTML page.

    But your example code consists of two parts: a link to a JS file, which will not be pulled into the aggregated autoptimize JS file, and then an inline JS, which will be written in the aggregate autoptimized JS file.

    Thread Starter minhduc.dev

    (@ducpl)

    Hi.
    Is there a way for your inline file to appear before the “</body>” tag?

    Plugin Author SilkyPress

    (@diana_burduja)

    Yes, you need to set “Footer” for the “Where on page” option from the right menu.

    Thread Starter minhduc.dev

    (@ducpl)

    I tried placing under “Footer” but inline Js still appears before the JS file of “Autoptimize plugin”.
    ? It seems impossible to give it behind the JS file of “Autoptimize plugin”

    Plugin Author SilkyPress

    (@diana_burduja)

    There is no way to set the order of the JS code in relationship to other JS from other plugins. This is simply how WordPress works. A plugin can set only the order of a JS file/code only in relationship to other JS files/codes from the same plugin.

    Thread Starter minhduc.dev

    (@ducpl)

    ok, I have another question, how long is the “Pro” version updated?

    Plugin Author SilkyPress

    (@diana_burduja)

    From the FAQ page: “With every purchase you also get support and updates for 1 year. After that you can use the plugin as long as you want, but won’t get updates and support. Before the license expires you can renew it with a 40% discount. ”

    Note that with the pro version the inline JS code in the footer will still be before the Autoptimize aggregate JS file, just like with the free version.

    Thread Starter minhduc.dev

    (@ducpl)

    Ok,
    Thank you

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘New compatible “Autoptimize plugin”’ is closed to new replies.