0 points

javascript - Script Tag - async & defer - Stack Overflow


dashboard

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.

https://stackoverflow.com/questions/10808109/script-tag-async-defer