JavaScript Loading Priorities in Chrome

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.

A Google Docs and HTML version of this table is also available.

Note: Loading priorities are not guaranteed to be consistent cross-browser so use this knowledge wisely and measure when unsure. Ideally, aim to delivery a great experience to the widest number of users possible.

If you’re a web developer wondering where you can see the “Loading Priority”, Chrome DevTools has an optional “Priority” column available in the Network panel. Right-click the column headers and you can switch it on:

The summary table of priorities is still correct as of February 2019. I would personally love to get a better understanding of loading priorities in other browsers too. Hopefully this overview is useful to someone out there!

Thanks to Kouhei, Dom Faralino, Pat Meenan, Kenji Baheux and Yoav Weiss for their contributions helping better explain Chrome’s network stack.

Further reading


Originally published at addyosmani.com.