缓存头 | 字段 | 意义 |
---|---|---|
Cache-Control | max-age | 可以覆盖 Expires 头,相对过期时间,单位是秒,cookie中的Expires 的单位是毫秒,注意区分 |
Cache-Control | no-cache | 确保每次浏览器都会重新向服务器发送请求,服务器来决定是否返回数据,有304的情况 |
Cache-Control | no-store | 不使用存储 等同于, Expires=0 ,max-age=0,服务器一定返回200,数据从响应报文中获取 |
Cache-Control | must-revalidate | 必须重新验证资源,主要给代理服务器用的,告诉他去源服务器请求数据 |
Expires | - | 绝对过期时间,与cache-control 中的max-age(优先级更高)效果一致 |
Pragma | - | HTTP/1.0 用的no-cache替换 Cache-Control的no-cache ie中才有效 |
网友评论