Vitals 101
Vitals 101
@CoreVitals101

defer vs async: the script attribute people guess wrong

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.
This post was published in the Telegram channel Vitals 101 (@CoreVitals101). All its posts are on the channel page.
Open on Telegram

Latest posts in “Tools and infrastructure”

All channels in this category →

реклама в сети

Готовы запустить рекламу через сеть public.tg?

Новый оффер, продукт, GEO, кейс, событие или партнёрский запуск — соберём маршрут под задачу и отдадим медиаплан.

Telegram для медиаплана: @AFFtop_connect. Быстрый тест: $20 за канал, $1000 за пакет по сети.