• Resolved brightidiots

    (@brightidiots)


    I tried excluding a specific plugin (pop-up) from the delayed JS loading on Litespeed, but this doesn’t seem to work.

    What I did:

    • Changed the setting for the entire site from delayed to deferred in Litespeed settings (plugin worked)
    • Added the plugin (/wp-content/plugins/pluginname/) to the JS Excludes and JS deferred excludesNo result
    • Talked to support of the plugin developer and added data-no-optimize=”1″ to the plugin files – No result
    • Tried excluding some seperate JS files (from the plugin) in the excludes (JS en deferred JS) – No result
    • When logged in (without optimizations) the plugins works, which is also the case when delayed JS loading is disabled.

      Hope there’s a solution for this.

      Thanks!

    • This topic was modified 2 years, 8 months ago by brightidiots.
    • This topic was modified 2 years, 8 months ago by brightidiots.
    • This topic was modified 2 years, 8 months ago by brightidiots.
Viewing 12 replies - 1 through 12 (of 12 total)
  • Plugin Support qtwrk

    (@qtwrk)

    have you tried to exclude the inline JS as well ?

    Thread Starter brightidiots

    (@brightidiots)

    Yes, we did, like this:

    <script data-no-optimize="1"> var brave_popup_data = {}; var bravepop_emailValidation='.json_encode($emailValidator).';</script>
    
    Plugin Support qtwrk

    (@qtwrk)

    try add a part of the inline code into the exclude list , instead of use data-no-optmize attr

    like brave_popup_data

    you may need to exclude others like jquery as well

    Thread Starter brightidiots

    (@brightidiots)

    Also added all inline JS to the exclude list (Jquery included) in the Litespeed options, no results, unfortunately.

    • This reply was modified 2 years, 8 months ago by brightidiots.
    Plugin Support qtwrk

    (@qtwrk)

    try all inline , alone with

    wp-content
    wp-inclutes
    

    see what happens.

    and please do remember purge all after each change.

    Thread Starter brightidiots

    (@brightidiots)

    Also added the wp-content en wp-includes, but no result. It seems like the exclusion function just doesn’t work.

    Anything else I can try to solve this?

    Plugin Support qtwrk

    (@qtwrk)

    it should work , but I think the thing is we did not find the correct string.

    what if you find all the inline js , alone with above 2 wp- into the list , purge all , how does that go ?

    Thread Starter brightidiots

    (@brightidiots)

    Thanks for your reply!

    To be sure: do you mean I add ‘wp-‘ to the JS exclude box in the Litespeed Settings?

    Plugin Support qtwrk

    (@qtwrk)

    no no , I mean

    add all the inline js you found in your page , alone with

    wp-content
    wp-includes
    Thread Starter brightidiots

    (@brightidiots)

    To be honest: I’m a bit lost. Don’t know howto get a list of these ‘inline JS’ files to exclude.

    Can you provide some guidance on howto make this list?

    If needed, I can (privately) share my staging environment for this website?

    • This reply was modified 2 years, 8 months ago by brightidiots.
    Plugin Support qtwrk

    (@qtwrk)

    Hi,

    disable the plugin , open your page on your browser , I assume it’s Chrome , then right click anywhere in your page , click “view source code”

    then in that page , search for <script any block that doesn’t contains a link to a jS file , should be considered as inline JS

    extract them , save them into a text file , then extract a piece of word/string from each of them , put them into the defer JS exclude list

    purge all ,and check again.

    Thread Starter brightidiots

    (@brightidiots)

    Thanks for your replies!

    Found the correct inline JS at the end and had to add this to all 3 excludes (no optimize, defer exclude and guest mode).

    Thanks again!

Viewing 12 replies - 1 through 12 (of 12 total)
  • The topic ‘Exclude plugin/file from delayed JS loading’ is closed to new replies.