HTTP ETag
From Wikipedia, the free encyclopedia
| Please help improve this article or section by expanding it. Further information might be found on the talk page or at requests for expansion. (July 2007) |
| HTTP |
| Persistence · Compression · SSL |
| Headers |
| ETag · Cookie · Referer |
| Status codes |
| 200 OK |
| 301 Moved permanently |
| 302 Found |
| 403 Forbidden |
| 404 Not Found |
An ETag (entity tag) is an HTTP response header returned by an HTTP/1.1 compliant web server used to determine change in content at a given URL. When a new HTTP response contains the same ETag as an older HTTP response, the contents are determined to be the same without further downloading. The header is useful for intermediary devices that perform caching, as well as client web browsers that cache results. One method of generating the ETag is based on the last modified time of the file and the size of the file.
[edit] Misuse
In certain situations, ETags may not improve the performance of a web application. For instance, some ETag generation schemes incorporate the file's inode on the system. The file's inode is unique only to the file on one specific machine. If a site has multiple servers that serve files (i.e. load balancing), a user may request for the same file and get a response from different machines. If the inode is used to generate the ETag, it will be different causing the file to be re-downloaded.
[edit] References
- ETag in HTTP/1.1 specification
- Apache HTTP Server Documentation - FileETag Directive
- Old SQUID Development projects - ETag support (completed in 2001)
- Concerning Etags and Datestamps by Lars R. Clausen (2004)
- ETag in Lighttpd

