Any way to control Javascript Async Load Order?

How to set the loading and execution order of two external asyncjavascript files ?

Given the following ...

<script src="framework.js" async></script> // Larger file
<script src="scripts.js" async></script> // Small file

Although the second order is scripts.jsloaded and executed before framework.jsdue to its file size, it scripts.jsdepends on framework.js.

Is there a way to specify the loading and execution order while maintaining the properties async?

+4
source share
2 answers

defer, . defer, async script, , html .

<script src="framework.js" defer></script>
<script src="scripts.js" defer></script>

, .

+10
+1

All Articles