Want more? Subscribe to my free newsletter:
JavaScript Loading Priorities in Chrome
February 18, 2019
How browsers schedule and execute scripts can impact the performance of web pages. While techniques like <script defer>
, <link rel=preload>
(and others) influence script loading, knowing how browsers interpret them can also be helpful. Thanks to Kouhei Ueno, we now have an up to date summary of script scheduling in Chrome.

Loading priority (network/Blink) |
Execution priority | Where should this be used? | |
<script> in <head>
|
Medium/High | VeryHigh - Blocks parser |
|
<link rel=preload> +<script async> hack
or
| Medium/High | High - Interrupts parser |
|
<script async>
|
Lowest/Low | High - Interrupts parser |
Be careful when considering <script async> . Today it is often used to indicate non-critical scripts, but is inconsistent in being loaded at low priority and executed at high priority.
|
<script defer>
|
Lowest/Low | VeryLow - Runs after <script> s at end of <body>
|
|
<script> at the end of <body>
|
Medium/High | Low - Waits parser end |
Be careful when using <script> at the end of <body> when you think they are low priority. These scripts are scheduled at Medium/High priority.
|
<script defer> at the end of <body>
|
Lowest/Low - end of the queue |
VeryLow - Runs after <script> s at end of <body>
|
|
<link rel=prefetch> + <script> in a next-page navigation
|
Idle / Lowest | Depends on when and how the script is consumed. | Scripts very likely to provide important functionality to a next-page navigation.
Examples:
|