Millisecond Mafia
Millisecond Mafia
@MillisecondMafia

Myth: async and defer do the same thing

Swapped defer for async on 3 scripts: FCP 1.2s -> 1.2s, but LCP 2.1s -> 3.0s.
Both download without blocking the parser. The difference is execution timing.
— async executes the instant it lands, mid-parse, and can preempt the main thread right as your LCP image is decoding.
— defer waits until DOM parse completes, then runs in order.
Three async scripts firing during render = 900ms of contended main thread.
Use defer for anything touching the DOM; reserve async for independent beacons.
Takeaway: async on render-path scripts cost +900ms LCP here.
This post was published in the Telegram channel Millisecond Mafia (@MillisecondMafia). 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 за пакет по сети.