We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
图解http第6章
Accept
If-Match
Cookie、Set-Cookie
端到端首部 必须保存在由缓存生成的响应中,且一定会被转发
逐跳首部字段 只对单次转发有效,会因通过缓存或代理而不再转发
// 1. 缓存请求指令 Cache-Control: no-cache, no-store, max-age=100, min-fresh=100, only-if-cached, no-transform // no-cache:不缓存过期资源,每次请求都强制向服务器再次验证一遍,即使是缓存的资源 // no-cache需要服务端在返回资源时指定,资源才不会被缓存,否则拿到的都是缓存资源 // 也就是说这个指令一般用在资源响应时才有效 // no-store:不缓存请求或响应的任何内容,真正的不缓存。 // max-age:缓存最大的时间,单位秒,在改时间内都直接拿缓存资源,不请求服务器。 // 当max-age:0时,则每次都将请求服务器 // min-fresh:期望在指定时间内响应仍有效 // only-if-cached:从缓存资源获取 // no-transform:代理不可更改媒体类型 // 2. 缓存响应指令 // 在前端开发中,一般都是作为缓存请求方
// 意思是Connection可指定哪些字段,代理服务器不转发。 Connection:Content-Type // 代理都不会转发Content-Type字段
我们可以看到,在浏览器请求中 服务器明确指出断开长连接
Connection: close
Accept: text/plain;q=0.3, text/text/html=0.4
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Accept
If-Match
Cookie、Set-Cookie
端到端首部
必须保存在由缓存生成的响应中,且一定会被转发
逐跳首部字段
只对单次转发有效,会因通过缓存或代理而不再转发
字段详解
我们可以看到,在浏览器请求中
服务器明确指出断开长连接
The text was updated successfully, but these errors were encountered: