我们常用的script标签,有两个和性能.js文件下载执行相关的属性:defer和async defer的含义[摘自https://developer.mozilla.org/En/HTML/Element/Script] This Boolean attribute is set to indicate to a browser that the script is meant to be executed after the document has been parsed. async的含
我们常用的script标签,有两个和性能.js文件下载执行相关的属性:defer和async defer的含义[摘自https://developer.mozilla.org/En/HTML/Element/Script] This Boolean attribute is set to indicate to a browser that the script is meant to be executed after the document has been parsed. 译文:这布尔属
1. script with async = "async" and without defer: the browser load the outter-js and DOM in async mode, they are loaded at the same time. 2. script with defer = "defer" and without async: the browser load the DOM first, when load actio