Support » Plugin: SG Optimizer » Defer JS doesn’t seem to work

  • Resolved shaulhadar10

    (@shaulhadar10)


    Hello, I am using your cache on lots of my sites, and it does quite well, but i have a bug , when i use the DEFER JS option, it doesn’t actually work.

    If i specify for instance this :
    https://www.thewoodlandstxgaterepairteam.com/wp-includes/js/jquery/jquery.js

    in the plugin it shows it is deffered, but in page speed it still shows it as an error, it is as if the deffering never happens.

    Please help me to fix this, i really need the extra juice on my sites 🙂

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

Viewing 3 replies - 1 through 3 (of 3 total)
  • Hi, I am sorry, I have the Jquery with a :
    Remove Query Strings From Static Resources

    on, but it still shows this as the pagespeed error…

    it shows as:
    https://www.thewoodlandstxgaterepairteam.com/wp-content/themes/GATESv6/jquery.js?ver=1.0.244

    I can’t make it disappear for some reason, please help me to fix this…

    Plugin Author Hristo Pandjarov

    (@hristo-sg)

    SiteGround Representative

    We support an exclude for scripts that cannot be defered. By default, when you enable this optimization, jQuery is excluded because if another script requires it, the library should be lodaded render-blocking. The optimization is working just fine and doing what it’s supposed to do.

    PageSpeed does not show errors but suggestions. If you’re not using jQuery – remove it alltogether or remove it from the exclude – it will be deffered. If you’re using it, leave it as is – not all scripts can be loaded asynchronously since loading order is important for many.

    Hi Hristo, and thanks for getting back to me.
    I understand what you are saying.
    My question, is if i have another kind of jquery version in my theme how can i manualy defer it also?
    Is there any way with the plugin? i mean to add other scripts , not just the ones that the plugin detects?

    Another thing, i noticed that sometimes when i check in google pagespeed, i see that the combined css is shown as need to be deferred, and sometimes i don’t see it.

    Is there any way to fix this in a future update? so the cache adds the minified css as deffered also?

    Thanks for your time!

Viewing 3 replies - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.