• Please defer. Setting the defer attribute in the Script tag will start loading the script tag content, but will not block rendering of subsequent document elements (HTML parsing). After all page elements have been parsed, the script tag code will be executed before the DOMContentLoaded event is triggered. The order of execution is in the order declared
  • Async: Set async property in script tag, also immediately download and execute, do not block the loading process of subsequent document elements, after downloading, will stop the HTML parsing immediately execute. Whoever finishes loading first, who executes, no order of execution, after the execution continues HTML parsing

Specific can be understood according to the following figure: