Cache Catch
Cache Catch
@CacheCatch

This week in caching: a browser-cache-header playbook for static assets

This week in caching: a browser-cache-header playbook for static assets

The headers that turn repeat visits instant. Skip if your build already fingerprints filenames.

— Fingerprint first — ship app.4f2a9.css via content hash; only then is aggressive caching safe.
— Immutable for hashed files — Cache-Control: public, max-age=31536000, immutable tells the browser never to revalidate, killing the conditional 304 round-trip.
— Short TTL for HTML — your entry HTML should be no-cache (revalidate every time) or a tiny max-age, or users never see new deploys.
— Separate the two policies — one rule for /assets/*, another for documents; a blanket max-age on HTML is the classic stale-deploy bug.
— Verify with curl -I — check the response header, not your config's intent.

Credit to Jake Archibald's 'Caching best practices' for the immutable + no-cache split.

Bookmark: MDN's Cache-Control reference — every directive, no fluff.
Этот пост опубликован в Telegram-канале Cache Catch. Подписаться можно по ссылке: @CacheCatch.
tech

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

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

start

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

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

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