The browser to the JS file operation has two main parts: Download and execution;
JS file download In some browsers is parallel, in some browsers are serial, such as: IE8, Firefox3, chrome2 are serial download;
Execution in all browsers is blocked by default, when JS in the execution of HTML parsing and other operations, so, the top of the page JS should not be too large, the conference caused the page long time in a blank state, for the outside chain of JS files, async and defer attributes can reduce the impact of page loading
Async Indicates whether JS executes asynchronously, when this property does not block the loading of the current page, and immediately after the JS download, but do not guarantee the execution order of multiple script tags
Defer indicates whether JS deferred execution, when there is this attribute, JS execution will be deferred until the completion of page parsing, can guarantee the execution order of multiple script tags, It is important to note that these two properties are currently invalid for inline JS and are asynchronous in the browser for script tags created in the DOM
If Async is true, then the script executes asynchronously after the download is complete
If Async is False,defer true, then the script executes after the page is parsed
If both async and defer are false, then the script stops parsing the page in the page parsing, immediately downloads and executes
Note: This article is from excerpt
The difference between script async and script defer