Cache Catch
Cache Catch
@CacheCatch

This week in caching: Cache-Control immutable vs ?v= query-string busting

This week in caching: Cache-Control immutable vs ?v= query-string busting

Two ways to ship a new asset without serving stale bytes:

— Query-string busting (app.js?v=5) is easy but historically some proxies refused to cache query-string URLs at all, and you keep editing the version by hand.
— Fingerprinted filenames (app.4f3a.js) + Cache-Control: max-age=31536000, immutable is the modern win — the URL changes when content changes, so you can cache forever and the browser skips even the revalidation request on reload.
— Why immutable matters: without it, a hard refresh still fires conditional requests for every asset; with it, the browser trusts the cache outright. Measurable on repeat-view page loads.

If your bundler emits hashes (Vite, webpack do), there's no reason to still be on ?v=.

Bookmark: Jake Archibald's 'Caching best practices' — the definitive pattern guide on this exact choice.
Этот пост опубликован в Telegram-канале Cache Catch. Подписаться можно по ссылке: @CacheCatch.
tech

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

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

start

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

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

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