• Resolved Hirak Kalita

    (@rieiirir)


    I enabled Lazy load image and Iframes. Images working as aspected. Iframes also working as aspected. But after enabling JS Delayed feature, iframes getting loaded instantly on interaction without scrolling to viewport.

    This is because if we enabled JS delayed, Litespeed adding data-litespeed-src to iframes instead of regular data-src. Additionally, Litespeed JS delayed script include a code document.querySelectorAll(“iframe[data-litespeed-src]”).

    so, why Delaying js also affect on iframes? Even iframe lazy load and js lazy load are two different approach? Please forward this to developers.

    Make sure to always load iframes when it enters viewport, even JS delayed enabled.

    If this issue not fixed ASAP, then many of Litespeed Cache Plugin users with JS delayed and lazy load iframes enabled will loss Video Content visibility on Search engine. Because without JS delayed enabled, it uses IntersectionObserver for iframe, so Search engine bot can easily crawl iframes videos like YouTube. But currently it Requires Interaction to load the Iframes. Iframes are working like JS DELAYED. Please fix this ASAP.

    Unable to generate report number: Failed to request via WordPress: [server] https://api.quic.cloud [service] wp/report

    GitHub: https://github.com/litespeedtech/lscache_wp/issues/595

    The page I need help with: [log in to see the link]

Viewing 1 replies (of 1 total)
  • supervisior

    (@supervisior)

    so, why Delaying js also affect on iframes?

    Because this iframe is Javascript driven and this YT iframe is not native HTML, because it is dynamically generated by Javascript. To fix it just whitelist YT Javascript to prevent delayed loading of the relevant JS.

    BTW, You you don’t to need to enable lazy load function of the cache plugin, because WordPress supports native image lazy load. This native lazy load is better, faster and don’t needs extra Javascript.

Viewing 1 replies (of 1 total)
  • The topic ‘Conflict Lazy load Iframe with JS Delayed’ is closed to new replies.