Myth: ETags are a free bandwidth win
This week in caching, the conditional-request tax:
— The pitch: ETags let browsers revalidate and skip re-downloading unchanged files.
— The fine print: a 304 still costs a full round trip to your origin, and default ETags on many servers are inode/mtime-based, so the same file across two load-balanced nodes gets different ETags and revalidation fails.
— Worth your time: for static assets, prefer a long immutable max-age with hashed filenames over per-request revalidation. Skip if you already fingerprint your assets.
Bookmark: Cache-Control: immutable means zero round trips; ETag means one every time. Disable inode ETags behind a load balancer.
Cache Catch
@CacheCatch
Myth: ETags are a free bandwidth win
Этот пост опубликован в Telegram-канале Cache Catch. Подписаться можно по ссылке: @CacheCatch.