When can I use etag for further verification?

Source: Internet
Author: User

In some cases, it is not enough to use only the Expires header and if-modified-since for verification, such:

1. Some documents may be periodically rewritten, for example, regular write from a background process, but the data actually contained does not change, that is, only the file timestamp has changed, the content hasn't changed, so although the content hasn't changed,

However, the modified date will change;

2. Some documents may have been modified, but the modifications are not important. You do not need to re-load data in the world buffer, such as modifying spelling or adding comments;

3. Some servers cannot accurately determine the last modification time of their pages;

4. Documents provided by some servers change within seconds. For example, real-time monitors may be unavailable for these servers with a modification date granularity of one second, because the time has not changed, but the content has changed.

In this case, you need to use etag as the verification model, but you need to avoid MD5 for the entire file, which consumes too much CPU resources.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.