QuizNot attempted
defer vs async
1–4 to choose, Enter to submit
Show answer & explanation
Correct answer:
- Both download in parallel; defer runs in document order after parsing, async runs as soon as it downloads (order not guaranteed)
- Both attributes download without blocking the parser
deferruns after parsing finishes, in document order, whileasyncruns as soon as its download completes, in whatever order they arrive.- Not 'async keeps order': backwards.
- Not 'defer blocks parsing': that is a plain
<script>. - Not identical: order and timing differ.
- Use defer for app code, async for independent scripts like analytics
type="module"is deferred by default.