Millisecond Mafia
Millisecond Mafia
@MillisecondMafia

Service worker cache vs HTTP cache headers

Both serve repeat visits fast. Control and cost differ.
—
HTTP cache (Cache-Control, immutable): free, browser-managed, zero JS. Repeat-visit asset load ~0ms from disk.
—
Service worker: programmable cache, works offline, can stale-while-revalidate. But adds ~20-60ms SW boot on navigation and ongoing maintenance.
—
For a content site, far-future immutable headers cover 90% of the win at zero runtime cost.
Reach for a SW only when you need offline or fine-grained strategies.
Takeaway: HTTP immutable = ~0ms repeat load with no SW boot tax.
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 за пакет по сети.