Asynchronous Scripts
The async attribute applies only to external scripts. It signals the browser to begin downloading the file immediately. The scripts marked as async are not guaranteed to execute in the specified order.
<!DOCTYPE html>
<html>
<head>
<title>Example HTML Page</title>
<script type="text/javascript" async src="example1.js"></script>
<script type="text/javascript" async src="example2.js"></script>
</head>
<body>
</body>
</html>
In this code, the second script file might execute before the first. For XHTML documents, specify the async attribute as async="async".