Skip to content

Async vs. Defer

mmedrano9438 edited this page Jan 15, 2024 · 1 revision

Main difference between async and defer is the timing of script execution. Order of Execution: async scripts execute as soon as they are downloaded, which is not necessarily in the order in which they appear in the document. defer, on the other hand, preserves the order and ensures that scripts execute after the document has been parsed.

Clone this wiki locally