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.