t4mer@notebook

// til · http · 1 july 2026 · 1 min

TIL: what an HTTP ETag is

An ETag is a fingerprint of a representation. If-None-Match asks “do I already have this?”

An ETag is a value the server associates with a specific version of a response. It is not a timestamp, though people use timestamps as a lazy cousin. It is a fingerprint: “this is representation X”.

The client stores it, then later sends If-None-Match. If the fingerprint still matches, the server can answer 304 Not Modified and skip the body.

That is caching as HTTP, not caching as Redis. It can surprise you if a middleware always returns 304, or if your fingerprint changes when the body did not (or does not change when it should).

I have a draft in the Problem Log for the day this bites me with numbers attached. Until then: 304 means “you already have it”, not “the resource is gone”.

Found something wrong?

These notes can be incomplete, or wrong in a different environment. Suggest a correction on GitHub or email me at me@t4mer.net.

// related