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
No description provided.
The text was updated successfully, but these errors were encountered:
no-cache 可以在本地缓存,可以在代理服务器缓存,但是这个缓存要服务器验证才可以使用 no-store 是禁用缓冲,本地和代理服务器都不缓冲,每次都从服务器获取
Sorry, something went wrong.
no-cache 和 no-store 用作控制缓存,被服务器通过响应头 Cache-Control 传递给客户端
no-cache
no-store
Cache-Control
永远都不要在客户端存储资源,每次永远都要从原始服务器获取资源
可以在客户端存储资源,但每次都必须去服务器做新鲜度校验,来决定从服务器获取最新资源 (200) 还是从客户端读取缓存 (304),即所谓的协商缓存
当服务器资源返回 304 时与那些 HTTP 响应头有关
一般情况下对于 index.html 或者现代构建环境下不加 hash 的静态资源都需要设置 Cache-Control: no-cache,用来强制每次在服务器端的新鲜度校验。
index.html
Cache-Control: no-cache
相当于以下响应头
Cache-Control: max-age=0, must-revalidate
No branches or pull requests
No description provided.
The text was updated successfully, but these errors were encountered: