• Resolved yvett

    (@yvett)


    Hello,

    I noticed that cookie-law-info is currently enqueued without the defer attribute, which can impact page load performance and script execution order.

    Could you update the script enqueuement to include defer? This ensures it loads asynchronously while preserving execution order before DOMContentLoaded. This should not impact GDPR regulations.

    Right now, we have to manually add it through

        add_filter('script_loader_tag', function($tag, $handle) {
    if ($handle === 'cookie-law-info') {
    return str_replace('src=', 'defer src=', $tag);
    }
    return $tag;
    }, 10, 2);

    Thank you.

    • This topic was modified 3 months, 1 week ago by yvett.
Viewing 1 replies (of 1 total)
  • conocebiz

    (@conocebiz)

    Hi I’m getting Largest Contentful Paint element alert – 15,160ms for element div.cky-notice. I’m using LiteSpeed Cache and added all JS and CSS code CookieYes team provided in other post but no luck yet. Can you please provide a work around? Thanks in advance,

    Rodrigo

Viewing 1 replies (of 1 total)
  • You must be logged in to reply to this topic.