• Resolved Hamed Azimi

    (@dadparvar)


    The “Load Inline JS” option has a huge impact on performance and we want to use it to “Deffer” the inline js codes.

    Pretty much everything is fine except one thing, which is related to the way WordPress core is handling the situation.

    So, when a theme is storing the settings, they use this method:
    https://developer.ww.wp.xz.cn/reference/functions/wp_localize_script/

    Which results in generating an inline js code. Which shouldn’t be deferred or it will break the site. This is the only thing we shouldn’t deffer on our site.

    Please add an option below “Load Inline JS” to let us exclude the things from being deferred. This helps us a lot. For example, this is how our theme is storing the settings:
    https://ibb.co/ccNYgNs

    If we exclude the “woodmart_settings” var from being deferred, everything will work just fine and we’ll get the huge improvement from other deferred js codes.

    Thanks

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Support qtwrk

    (@qtwrk)

    Hi,

    please try Page optimization -> Tuning setting -> Defer JS exclude , add partial words , or keys word of your inline JS into that field , from your screenshot , for example , woodmart_settings

    save and purge all

    Best regards,

    Thread Starter Hamed Azimi

    (@dadparvar)

    Thanks, @qtwrk

    This helped. I’ll let you know in case I face other issues down the road.

    Plugin Support qtwrk

    (@qtwrk)

    sure , please keep me posted

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

The topic ‘Option to exclude from “Load Inline JS”’ is closed to new replies.