Vitals 101
Vitals 101
@CoreVitals101

defer vs async on your scripts

defer vs async on your scripts

Both keep a script from blocking your page, which protects FCP and LCP (how fast text and images appear). The difference is timing. async runs each script the instant it arrives, in any order. defer waits until the page is built, then runs them in order.

Think of async as guests barging in whenever, and defer as a calm seating plan.

When each fits:
— A script that depends on others, or touches the page layout: defer, so order stays correct.
— A standalone tag like analytics that needs nothing else: async is fine.

Try this: look at your <script> tags in the page head. Any without defer or async is render-blocking. Add defer as your safe default. It rarely breaks anything.
Этот пост опубликован в Telegram-канале Vitals 101. Подписаться можно по ссылке: @CoreVitals101.
tech

Свежие посты в категории «Tech Infrastructure»

Все каналы категории →

start

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

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

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