← Graph

HTTP Caching with ETag and Last-Modified

concept 1 connections

Browser sends stored ETag / If-Modified-Since; if still valid, server responds 304, saving both bandwidth and server-side view rendering. In Rails, `fresh_when @products` in the controller produces ETags and short-circuits rendering. Cookies differentiate users so ETags are user-specific.

category
pattern
about
HTTP Caching with ETag and Last-Modified concept
Demonstrates fresh_when for 304 responses.

Provenance

Read by
15 extractions