I'm using the CakePHP 3.0.3 PHP Framework and would like to know how to enter the keywords defer and async in the script tags and omit the values: / p>
How to insert a script with the framework:
<?= $this->Html->script('jquery-1.11.1.min.js') ?>
How to render:
<script src="/js/jquery-1.11.1.min.js"></script>
As you would like it to be:
<script async src="/js/jquery-1.11.1.min.js"></script>
<script defer src="/js/jquery-1.11.1.min.js"></script>
In the documentation I saw nothing that I could do this insertion.
An alternate way I'm using is to do the following:
<?= $this->Html->script('jquery-1.11.1.min.js',['defer' => true]) ?>
and is rendering:
<script src="/js/jquery-1.11.1.min.js" defer="defer"></script>