不让浏览器缓存index.html

参考文档:https://www.2cto.com/ask/question/4598

location = /index.html { add_header Cache-Control "no-cache, no-store"; } no-cache, no-store可以只设置一个no-cache浏览器会缓存,但刷新页面或者重新打开时 会请求服务器,服务器可以响应304,如果文件有改动就会响应200no-store浏览器不缓存,刷新页面需要重新下载页面

原文地址:https://www.cnblogs.com/huochaihe/p/9566543.html