HTTP ETag - Deployment Risks

Deployment Risks

The use of ETags in the HTTP header is optional (not mandatory as with some other fields of the HTTP 1.1 header). The method by which ETags are generated has never been specified at any time in the HTTP specification.

Common methods of ETag generation include using a collision-resistant hash function of the resource's content, a hash of the last modification timestamp, or even just a revision number.

In order to avoid the use of stale cache data, methods used to generate ETags should guarantee (as much as is practical) that each ETag is unique. However, an ETag-generation function could be judged to be "usable" if it can be proven (mathematically) that duplication of ETags would be "acceptably rare", even if it could or would occur.

Some earlier checksum functions, such as CRC32 and CRC64, are known to suffer from this hash collision problem. Because of this they are not good candidates for use in ETag generation.

Read more about this topic:  HTTP ETag

Famous quotes containing the word risks:

    The amount of it is, if a man is alive, there is always danger that he may die, though the danger must be allowed to be less in proportion as he is dead-and-alive to begin with. A man sits as many risks as he runs.
    Henry David Thoreau (1817–1862)