首页 > 技术文章 > 禁止 Html 缓存

xlsdg 2020-06-15 15:35 原文

 1 server {
 2     listen  81;
 3     server_name xxxx.com;
 4     root /xxxx/prod;
 5     index index.html;
 6 
 7     location ~ .*\.(htm|html)$ {
 8         add_header "Cache-Control" "max-age=0, no-cache, no-store, must-revalidate";
 9         add_header "Pragma" "no-cache";
10         add_header "Expires" "-1";
11     }
12 }

 

推荐阅读