0
点赞
收藏
分享

微信扫一扫

Macs Fan Control 1.5.16 Pro for mac风扇调节软件

晴儿成长记 2023-09-15 阅读 38

Nginx配置不缓存html

1. 配置nginx不缓存html

1.1 修改配置文件

location / {
 expires 1h;
 root /home/html;
 index index.html index.htm;
 ## html不缓存 
 if ($request_filename ~* .*\.(htm|html)$){
     add_header Cache-Control "no-store";
 }
}

1.2 验证

在这里插入图片描述

2. Vue项目修改根目录index.html

//head中添加以下代码,会使所有打css/js资源重新加载
<meta http-equiv="pragram" content="no-cache">
<meta http-equiv="cache-control" content="no-cache, no-store, must-revalidate">

举报

相关推荐

0 条评论