Root Access Daily
Root Access Daily
@RootAccessDaily

Repeat-visit load fell 80% with one expires block

Repeat-visit load fell 80% with one expires block
Just did this on a $5 box. Browsers were re-fetching every image, font and CSS on each pageview because nothing set cache headers, ~70% of requests were static refetches.
— location ~* \.(jpg|png|webp|css|js|woff2)$ { expires 30d; add_header Cache-Control "public, immutable"; }
Returning visitors now pull static from browser cache, conditional 304s for the rest. nginx static request volume dropped ~80%, egress fell with it. The immutable flag stops even the revalidation ping on hashed assets.
Try it tonight.
Этот пост опубликован в Telegram-канале Root Access Daily. Подписаться можно по ссылке: @RootAccessDaily.
tech

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

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

start

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

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

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