(Weak) ETags and Last-Modified

天大地大妈咪最大 提交于 2019-12-02 20:38:14

The difference between a regular (strong) ETag and a weak ETag is that a matching strong ETag guarantees the file is byte-for-byte identical, whereas a matching weak ETag indicates that the content is semantically the same. So if the content of the file changes, the weak ETag should change as well.

In the scenario you present, the file on the server may be newer than the cached copy in the client -- but since the ETag matches, it is semantically equivalent to the cached copy so it would be acceptable to return a 304 response.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!