CodeZettaInterview Hub

HTML · Performance · Junior · Comparison

Explain defer vs async on script tags.

Short Interview Answer

async executes when ready (order not guaranteed); defer waits for parse and runs in order before DOMContentLoaded.

Detailed Explanation

module scripts defer by default. Put non-critical scripts deferred; avoid blocking parser without reason.

Did you know this answer?