I want to add the async
attribute to a script tag in the <head>
block. I've successfully added the script tag to the default_head_blocks.xml
file in Magento_Theme
as per the example in the Devdocs, but can't work out how to add an additional attribute to the tag with Magento 2.
I've tried:
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.4/js/bootstrap.min.js" src_type="url" async="async"/>
but this doesn't work.