HTTP ETag Header
An identifier for a specific version of a resource. Used for cache validation and conditional requests to avoid re-downloading unchanged content.
Purpose
Enables efficient caching by allowing clients to check if a resource has changed without downloading the full content.
ETag: "<hash>" ETag: W/"<hash>" (weak validator) Example: ETag: "33a64df551425fcc55e4d42a148795d9f25f89d4"
Code Examples
See how to use the ETag header in different tools and languages.
Related Headers
If-None-Match
Makes the request conditional. The server responds with 304 Not Modified if the resource's ETag matches the provided value. Otherwise returns the full resource with 200.
Cache-Control
Specifies caching directives for both requests and responses. Controls how and for how long content is cached by browsers and intermediate caches.
Last-Modified
Indicates the date and time when the resource was last modified. Used for cache validation with If-Modified-Since.