• Resolved rudolfl

    (@rudolfl)


    Hi,

    This option has two modes (beside OFF) – Deferred and Delayed. Delayed is generally not good for user experience.

    Deferred only defers JS until HTML is loaded. I would like to introduce further delay of, say, 2s. Is it possible? Perhaps with some sort of filter in the code?

    At the moment, I am using WP Meteor plugin to do that and it works well. But I do get warning about compatibility and, if possible, I would like to keep functionality within LiteSpeed Cache plugin.

Viewing 4 replies - 1 through 4 (of 4 total)
  • Delayed is generally not good for user experience.

    Why? Delayed means that Javascript is loaded after user action like scrolling or clicking, so it takes not as much time to load the page. Why should that not be good for user experience?

    I would like to introduce further delay of, say, 2s. Is it possible?

    No, deferred loading is a fixed and standardized javascript technology that loads defined code after document is ready, but you can make a suggestion at LiteSpeed Slack to add this feature in upcoming versions of the plugin.

    Thread Starter rudolfl

    (@rudolfl)

    “Why? Delayed means that Javascript is loaded after user action like scrolling or clicking, so it takes not as much time to load the page. Why should that not be good for user experience?”

    May be a bad choice of words. I did try this before, but my theme renders number of elements using javascript. As a result, some elements are not rendered until first user interaction.

    Yes, this is the handicap of delayed loading.

    Plugin Support qtwrk

    (@qtwrk)

    yes, it depends on how your page is rendered , if it depends on certain js to render the page, delay could cause some visual impact , but you can also exclude the related js from being delayed

    it’s actually a good idea for “delay X seconds” and other user has suggested it as feature request

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘“Load JS Deferred ” timing’ is closed to new replies.