async="async" attribute of a <script> tag in html, What does it mean?

async="async" attribute of a <script> tag in HTML, What does it mean?

<script async="async" src="...."></script>

Can be see used here for example


If the async attribute is set on an external script (one with src=), browsers that support it will download that script in the background without blocking the rest of the content on the page. The script will execute whenever it is finished downloading.

http://dev.w3.org/html5/spec/Overview.html#attr-script-async

As I mentioned in a comment, setting async=true, async=false or async=anything all mean the same thing. They enable the async behavior. The only way to make a script non-async is to completely omit the attribute.

http://dev.w3.org/html5/spec/Overview.html#boolean-attributes


In XHTML it is needed to consequently note attributes as attributes and their values whereas HTML does not. I like the conformity of that principle so I always use it in the form of:

async="async"

This way I can serve my documents as application/xhtml+xml.

If this is not of any interest for you because you are of the opinion that serving your document as text/html is good enough, then you can always use:

async