My fundamental problem is I want to get a good Core Web Vitals score, but anyway, that's a separate story.
I've used DayCounts plugin that enables defer and async on JS files. When I enabled it though, I could see that the actually output in the scripts is
Code: Select all
asnyc
Code: Select all
async
This can be seen in the code below:
Code: Select all
if ($this->params->get('async')) {
$debug .= '<li>'.$url.' ==> <span class="label label-success">ASYNC</span></li>';
$doc->_scripts[$url]['async'] = true;
}