Add defer Attributte
-
Hello,
I noticed that
cookie-law-info
is currently enqueued without thedefer
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 beforeDOMContentLoaded
. This should not impact GDPR regulations.
Right now, we have to manually add it throughadd_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.
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- You must be logged in to reply to this topic.