• Resolved impex23

    (@impex23)


    Hi, I have an issue with autoptimize plugin in one of my websites , as we have done the settings and checked the Optimize JavaScript Code? non-logged-in users are not able to view the js scripts. The website is done using Timber Framework with WordPress and also is there any option to exclude the twig file in which we have all scripts called scripts.twig but this is not an external js file, the code written here are visible in the view page source and there is no scripts.twig in the source code

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

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

    (@optimizingmatters)

    when “optimize JavaScript” is on, what errors do you see on the browser console?

    re. twig JS; if that is inline simply deactivate the option to aggregate (or defer) the inline JS?

    Thread Starter impex23

    (@impex23)

    I am not getting any error in the console but the js code is not visible in the view page source for non-logged in users, how to fix this issue and this is dropping the core web vitals, so I need to keep js code visible and also to fix core web vitals

    Thread Starter impex23

    (@impex23)

    Also aggregate inline JS?
    when I check this option I am getting that issue, as the non-logged in users are not able to view the js code in the view source code, how to fix it

    • This reply was modified 1 year, 4 months ago by impex23.
    Plugin Author Optimizing Matters

    (@optimizingmatters)

    well, JS code does not have to visible, the reason it’s not visible is that it’s part of the aggregated file. but if you don’t want that you can keep that option disabled?

    Thread Starter impex23

    (@impex23)

    if that option is disabled, then core web vitals will be more than 9.5 s

    Plugin Author Optimizing Matters

    (@optimizingmatters)

    well, as JS code does not have to be visible in the HTML to function, you could simply let the inline JS be aggregated?

    OR you could exclude specific inline JS by adding a (unique) keyword that is in the block of inline JS you would like to keep in the HTML?

    Thread Starter impex23

    (@impex23)

    desktop will be fixed, I am talking about mobile core web vitals

    Plugin Author Optimizing Matters

    (@optimizingmatters)

    I had a quick look at the Pagespeed Insights for mobile; the biggest issue by far currently is the “server response time”, for which you should implement page caching (this is not part of Autoptimize, but you can install e.g. KeyCDN Cache Enabler for that or you could give Autoptimize Pro a try).

    Javascript-wise the biggest issue seems to be with the Google Tag Manager code which AO can’t optimize. consider simplifying the amount of logic implemented in GTM?

    Thread Starter impex23

    (@impex23)

    Okay, thanks for the quick response so issue is not from Autoptimize then, we will try to check with server response time then, thank you

    Plugin Author Optimizing Matters

    (@optimizingmatters)

    you’re welcome, feel free to leave a review of the plugin and support here! ??

    frank

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘Exclude javascript from optimization’ is closed to new replies.