HTTP ETag

From Wikipedia, the free encyclopedia

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

[edit] See also

Languages