HTML parse order / script execution order

前端 未结 3 1768
余生分开走
余生分开走 2021-01-05 08:12

the following lines are from the official jQuery website



        
3条回答
  •  醉话见心
    2021-01-05 08:27

    Lets talk about the more traditional way of handling without using attribute defer or async

    The browsers will:

    1. Download scripts, blocking other resource from downloading

    2. Parse the scripts

    3. Execute the scripts

    See Ch1, Loading and Executing from High Performance JavaScript

    Here's another good reference 12.3. Execution of JavaScript Programs from JavaScript: The Definitive Guide, 4th Edition

提交回复
热议问题