1. Home
  2. Javascript
  3. Defer

Defer attribute can be added to the script tag loading an external file. This will defer execution of the file until the whole page is parsed. It's a common technique improving site performance by delaying potentially blocking assets.

#javascript#performance
<script src="/path/to/the/script.js" defer></script>
copy
Full Javascript cheatsheet