• You can add the following code to all js scripts (including inline):

    data-no-optimize=”1″ data-no-defer=”1″

    es:
    <script data-no-defer=”1″ data-no-optimize=”1″ id=“defer-js”>…

    To make it compatible with Litespeed?

Viewing 8 replies - 1 through 8 (of 8 total)
  • Plugin Author shinsenter

    (@shinsenter)

    @stefa98

    I do not fully understand your usage scenario and what you want. If you want this plugin to ignore an element in HTML, you can add the data-ignore attribute to the element’s tag.

    Thread Starter stefa98

    (@stefa98)

    No, I use Litespeed Cache for the js defer, while for the lazy loading of images, this plugin.
    Being that litespeed cache puts this plugin in defer, the images are loaded late, very late because obviously the script is loaded in defer.
    I need to add those two tags, listed above in all scripts used by this plugin.

    Plugin Author shinsenter

    (@shinsenter)

    @stefa98

    I am not sure if it was a defer.js plugin problem or due to another litespeed option, since version 2.0 this plugin is optimized for script tags with defer attribute only.

    What version of defer.js plugin are you using?

    Plugin Author shinsenter

    (@shinsenter)

    @stefa98

    You may try uncheck the “Optiomize javascript” option in the plugin settings to tell the plugin skip all script tags on your page.

    Thread Starter stefa98

    (@stefa98)

    I have not explained, sorry.

    The LiteSpeed plugin adds the “Defer” attribute to your plugin’s javascript.
    This causes a delay in lazy loading of your plugin images.
    To fix this, I need to add those two attributes to your plugin’s javascript.

    Plugin Author shinsenter

    (@shinsenter)

    @stefa98

    I can understand it this way: you are using two different plugins at the same time and are having both javascript optimization enabled at the same time, and that is leading to your issues.

    For that reason, there is nothing better than to consider disabling the javascript optimization of either plugin as I mentioned. Unnecessary adding new attributes will reduce the performance of the plugin, and result is no difference.

    Please try it!

    • This reply was modified 3 years, 7 months ago by shinsenter.
    Thread Starter stefa98

    (@stefa98)

    No, I’m only using litespeed to optimize javascript
    and litespeed defer also the inline scripts of this plugin (defer.js)

    Plugin Author shinsenter

    (@shinsenter)

    @stefa98

    Got it. I will consider adding new plugin setting for your needs in future.

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Litespeed Compatibilty (URGENT)’ is closed to new replies.