if-modified-since vs if-none-match

前端 未结 7 1850
别跟我提以往
别跟我提以往 2020-12-04 05:32

What could be the difference between if-modified-since and if-none-match? I have a feeling that if-none-match is used for files whereas if-modified-since is used for pages?<

7条回答
  •  攒了一身酷
    2020-12-04 06:22

    As it is stated in google's best practices :

    It is important to specify one of Expires or Cache-Control max-age, and one of Last-Modified or ETag, for all cacheable resources. It is redundant to specify both Expires and Cache-Control: max-age, or to specify both Last-Modified and ETag.

    https://developers.google.com/speed/docs/best-practices/caching

提交回复
热议问题