Both defer and async stop a script from blocking your page, but they behave differently, and choosing wrong can break things.
Think of two delivery drivers. async drops the package the instant it arrives, even mid-traffic — fast but order isn't guaranteed. defer waits until the road is clear and delivers everything in order.
The rule of thumb:
1. Use defer for your own scripts that depend on each other or on the page being ready.
2. Use async for independent third-party tags like analytics that don't care about order.
3. Never use plain script tags in the head for non-critical code — that blocks.
Getting this right speeds up both LCP and INP at once.
Try this: change one head script to defer, reload, and confirm the page still works — then keep it.
Vitals 101
@CoreVitals101
defer vs async: the script attribute people guess wrong
This post was published in the Telegram channel Vitals 101 (@CoreVitals101). All its posts are on the channel page.
Open on Telegram