Home > Backend Development > PHP Tutorial > 设置了Cache-Control:max-age=0, 重启浏览器输入url访问还是会从缓存中读资源?

设置了Cache-Control:max-age=0, 重启浏览器输入url访问还是会从缓存中读资源?

WBOY
Release: 2016-06-06 20:31:30
Original
2435 people have browsed it

rt 为什么会是200(from cache)

回复内容:

rt 为什么会是200(from cache)

200(from cache)是不像服务器发送请求,直接读取的缓存
304 是向服务器发送请求,服务器认为本地有缓存,就读取缓存

200(from cache)是哪个资源请求?
带有Cache-Control:max-age=0 header头的又是你的哪个资源请求?

同一个资源请求,带有Cache-Control:max-age=0 header头,一般不会返回200(from cache),
返回的是304 Not Modified 或者 200 OK;

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template