0 points

javascript - Script Tag - async & defer - Stack Overflow


Tue Aug 25 2020 20:14:19 GMT+0000 (UTC)

Posted by @le_wiseman #javascript

<script       src="myscript.js"></script>

<script async src="myscript.js"></script>

<script defer src="myscript.js"></script>
content_copy Copy

This determines where/when the javascript file(linked in the HTML) will be loaded. Async is not fixed/predictable-pages load at the same time. defer loads after the page finishes loading.