IIS 8.0 add both Expires header and Cache-Control

好久不见. 提交于 2019-12-02 01:08:29

According to the specification there is no way you can have both of them at the same time. But you have no reason to do that, you'll be fine with any of them.

Specification

If you look into Chrome source code, caching in browser has several simple rules

First:

The max-age directive takes priority over Expires, so if max-age is present in a response, the calculation is simply: freshness_lifetime = max_age_value

Second:

Otherwise, if Expires is present in the response, the calculation is: freshness_lifetime = expires_value - date_value

Third:

If we missed previous steps and "cache-control" != "must-revalidate", then browser has one more caching rule: It caches resource for 10% of a time passed since last modified date of a resource.

That's it, no more rules there.

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