Support » Plugin: LiteSpeed Cache » data-no-defer=”1″ attribute not working

  • Resolved rafaucau

    (@rafaucau)


    On the wp-admin/admin.php?page=litespeed-page_optm#settings_tuning page I found the information that I can add the HTML attribute data-no-defer="1" to my script to disable defer, but it doesn’t work.
    defer

    • This topic was modified 7 months, 1 week ago by rafaucau.
Viewing 7 replies - 1 through 7 (of 7 total)
  • Thread Starter rafaucau

    (@rafaucau)

    Report number: ZIBOFBBJ

    Plugin Support qtwrk

    (@qtwrk)

    Hi,

    May I know how did you add it ?

    you may need to add that BEFORE LSCWP starts to optimize the page.

    Best regards,

    Thread Starter rafaucau

    (@rafaucau)

    Hi @qtwrk

    May I know how did you add it?

    I added this in the theme code (I have inline script in header.php)

    Plugin Support qtwrk

    (@qtwrk)

    Hi,

    Could you please post that code , I will try to reproduce it from my side

    I tried add this into bottom of my theme footer

    <script data-no-optimize="1">
    document.getElementById("demo").innerHTML = "Hello JavaScript!";
    </script>

    and it works

    Thread Starter rafaucau

    (@rafaucau)

    @qtwrk
    data-no-optimize="1" works but data-no-defer="1" doesn’t

    Plugin Support qtwrk

    (@qtwrk)

    Hi,

    oh yes , sorry my bad.

    I see , it’s due to inline JS has been minified/combined as well , so this attribute is not being obeyed.

    will report to dev , you can use no-optimize or JS exclude for the time being.

    Best regards,

    Plugin Support Hai Zheng⚡

    (@hailite)

    This is a good catch. Fixed in v3.6-rc4.

    Thanks.

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘data-no-defer=”1″ attribute not working’ is closed to new replies.