Nginx中使用如下配置
location ~* \.(html)$ {
add_header Cache-Control "no-cache";
root /usr/share/nginx/html;
}
本文介绍了如何在Nginx服务器配置中,通过location指令和add_header来设置Cache-Control,从而禁止.html文件的缓存,确保内容总是从服务器获取最新版本。
Nginx中使用如下配置
location ~* \.(html)$ {
add_header Cache-Control "no-cache";
root /usr/share/nginx/html;
}
4372
1271

被折叠的 条评论
为什么被折叠?