1. Home
  2. Javascript
  3. Defer
#javascript#performance

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.

<script src="/path/to/the/script.js" defer></script>
copy
Full Javascript cheatsheet
Sitemap Git repository