• Resolved cloudres

    (@griotta)


    Hello there,

    I’m trying to defer some JS on our web site. I’d like to ask you how I can choose which JS defer if after the minify all JS files made by Litespeeed are like “231312.js”. These numbers always changes: https://www.dropbox.com/s/okn2dkmjl7nxogb/Screenshot%202020-03-17%2011.21.15.jpg

    For example I’d like to defer some JS related to Facebook. Considering that do not exist a way to defer only some files, I need to defer all JS and then exclude some. But how I can exclude all JS minified by Litespeed?

    Thanks.

Viewing 9 replies - 1 through 9 (of 9 total)
  • Plugin Support Hai Zheng?

    (@hailite)

    You can try using the path litespeed/cssjs/

    Thread Starter cloudres

    (@griotta)

    In our case JS and CSS files are not there. But inside /xxxx.com/min/. I tried to use it to exclude the CSS and JS files minified by Litespeed, but it did not work. The Facebook JS are uploading in the same position. And in the meanwhile I see some issues with the layout.

    Maybe you should try to think a way to optimize the manage of common external JS like Facebook and Google one. Who do not use them with WordPress?

    Plugin Support qtwrk

    (@qtwrk)

    Hi,

    When you have JS optimization off , you should see a real path to the JS file , please try exclude that path , instead of the ones in /min/

    Best regards,

    Plugin Support Hai Zheng?

    (@hailite)

    In v3, the path is what I replied. In v2, its /min/

    Thread Starter cloudres

    (@griotta)

    Thanks to both.

    I tried to do as @qtwrk suggested, but something goes wrong with the loading of some JS. Theoretically there shouldn’t be any difference between a JS loaded without JS Deferred on and inserting it in JS Deferred excluded. Instead some JS does not work if I try to set on the JS Deferred feature and try to exclude them. So I simply can’t use that function.

    But it’s not only that. I was trying to defer some JS that are not really important to print the page. And they remains there also with JS Deferred on and also without including them in DS Deferred excluded.

    Plugin Support qtwrk

    (@qtwrk)

    Hi,

    I’m bit of confused now , could you please clarify what exactly is it you want to do ?

    Best regrds,

    Thread Starter cloudres

    (@griotta)

    I’d like to defer the loading of some JS. If I understood well there isn’t a way to do it directly. But I need to defer all JS and only then exclude some JS that I want to keep above. I did it, but without any result.

    For example, WordPress loads some JS that are not really important to print the page. So I’d like to defer them. But following the instruction mentioned above it doesn’t work. The JS remain immediately after the CSS files. The same thing happen with external JS and internal.

    Do you have any suggestion to try to fix it?

    Plugin Support qtwrk

    (@qtwrk)

    Hi,

    What if , you reset LSCWP to default , and only enable defer JS

    how does these JS’ being loaded ? please check with HTML code , see if there is defer flag.

    Best regards,

    Thread Starter cloudres

    (@griotta)

    Right now we found a good compromise combining some JS and excluding some. We’ll avoid to defer JS now, because we’re already glad about the result. Thanks the same!

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘JS optimization’ is closed to new replies.