← All headersRequest header

What is an If-None-Match header?

Makes a request conditional on the resource not matching any of the given ETags - the ETag equivalent of If-Modified-Since.

If-None-Match is the ETag-based sibling of If-Modified-Since, letting a client ask a website to only send a fresh response if the content's fingerprint has actually changed, which tends to be more precise than a timestamp comparison. It's one of the more reliable ways to validate that a website's caching layer is behaving correctly, since a healthy setup should return 304 Not Modified when the ETag still matches instead of resending the whole payload.

Common use case

A single-page app re-fetching its API data on every load sends the previous response's ETag as If-None-Match, letting the server return a cheap 304 instead of the full payload when nothing has changed.

Example

If-None-Match: "33a64df551425fcc55e"

History

Part of the original HTTP/1.1 specification, RFC 2068 (1997).

Did you know?

It also doubles as the standard mechanism for preventing lost updates on a resource creation - sending If-None-Match: * ensures a PUT only succeeds if the resource doesn't already exist.