• Hi,

    I am using WordPress 4.8.2 and airpro theme.

    In my case, autoptimize is not optimizing some scripts, these are contactform 7 scripts.js, /wp-includes/js/wp-embed.min.js,plugins/js_composer/assets/js/dist/js_composer_front.min.js, plugins/js_composer/assets/lib/waypoints/waypoints.min.js, plugins/airpro-plugin//public/js/main.js, themes/airpro/assets/js/wheels-plugins.min.js and themes/airpro/assets/js/wheels-main.min.js, what I have noticed is all are enqueued in footer.

    Google page speed showing all as render blocking script in mobile while not in desktop. ( contactform7 in both ).

    Is it obvious or I can make them forced enqueued with some setting or code? Because of this some functionality in my site are not working.

    Please suggest some idea, how I can deal with it?

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

    (@optimizingmatters)

    looks like the airpro theme/ plugin is using autoptimize’s API to forcefully exclude those scripts @prafulla. try switching to a different theme (and disabling the airpro plugin) to confirm? if not that, you’ll have to try disabling other plugins to see which one is causing this.

    hope this helps,
    frank

    Thread Starter Prafulla Kumar Sahu

    (@prafulla)

    Hi Frank, thank you so much for your kind reply. Can you give me more idea on the difference in mobile and desktop Google page speed result. As Google page speed does not think the scripts are render blocking for desktop but for mobile these are render blocking. Thank you again. ??

    Plugin Author Optimizing Matters

    (@optimizingmatters)

    I’m afraid GPSI is somewhat of a black box @prafulla, not sure why they would consider a JS-file as render-blocking on desktop but not on mobile.

    Thread Starter Prafulla Kumar Sahu

    (@prafulla)

    Hi Frank, thank you for your reply again, but my question was reverse, the JS-file are render blocking on mobile and not in Desktop. Beside the theme there is also other script I have listed which are render blocking, so may be the issue is not the theme.

    Plugin Author Optimizing Matters

    (@optimizingmatters)

    Hi Frank, thank you for your reply again, but my question was reverse, the JS-file are render blocking on mobile and not in Desktop.

    same black box though, no idea really @prafulla

    Beside the theme there is also other script I have listed which are render blocking, so may be the issue is not the theme.

    well, the question (for me) is not why they are render-blocking, but rather why they are not autoptimized. even if the js-files are not in the theme folder, it is still perfectly possible the theme is excluding them from autoptimization, hence my suggestion to test by -briefly- switching themes (and also disabling the airpro plugin which)

    Thread Starter Prafulla Kumar Sahu

    (@prafulla)

    In this time, I have tried adding defer to those scripts using script_loader_tag filter and now the scripts are not render blocking but interestingly the page speed remain same no improvement. I will try your suggestion and report to you.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Why autooptimize is not optimizing few scripts’ is closed to new replies.