Jump to content

HTTP ETag: Difference between revisions

From Wikipedia, the free encyclopedia
Content deleted Content added
Corrected 'http://1.1' to 'HTTP/1.1'
Corrected 'http://1.1' to 'HTTP/1.1' in another place
Line 5: Line 5:


== References ==
== References ==
*[http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.19 ETag in http://1.1 specification]
*[http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.19 ETag in HTTP/1.1 specification]
*[http://httpd.apache.org/docs/2.2/mod/core.html#fileetag Apache HTTP Server Documentation - FileETag Directive]
*[http://httpd.apache.org/docs/2.2/mod/core.html#fileetag Apache HTTP Server Documentation - FileETag Directive]
*[http://devel.squid-cache.org/old_projects.html#etag Old SQUID Development projects - ETag support] (completed in 2001)
*[http://devel.squid-cache.org/old_projects.html#etag Old SQUID Development projects - ETag support] (completed in 2001)

Revision as of 14:22, 4 November 2008

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 for 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.

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 to the file only on one specific machine. If a site has multiple servers, each with its own copy of the file (i.e. load balancing), then a user's request for the same file may get served by a different machine. In that case, the inode will almost certainly be different and, if it is used to generate the ETag, it will cause the file to be re-downloaded.

References

See also