Add defer Attributte
-
Hello,
I noticed that
cookie-law-infois currently enqueued without thedeferattribute, 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)
The topic ‘Add defer Attributte’ is closed to new replies.