What's the difference between Cache-Control: max-age=0 and no-cache?

后端 未结 9 1891
小蘑菇
小蘑菇 2020-11-22 09:32

The header Cache-Control: max-age=0 implies that the content is considered stale (and must be re-fetched) immediately, which is in effect the same thing as

9条回答
  •  旧时难觅i
    2020-11-22 10:20

    Old question now, but if anyone else comes across this through a search as I did, it appears that IE9 will be making use of this to configure the behaviour of resources when using the back and forward buttons. When max-age=0 is used, the browser will use the last version when viewing a resource on a back/forward press. If no-cache is used, the resource will be refetched.

    Further details about IE9 caching can be seen on this msdn caching blog post.

提交回复
热议问题