解决微信更新 h5 页面有缓存导致不生效问题
后端设置响应头
# 缓存设置 -1 为永不缓存
expires -1;
# 添加返回头字段,设置 HTTP 请求头
add_header Cache-Control "private, no-store, no-cache, must-revalidate, proxy-revalidate";
或者前端设置 meta 标签
<meta http-equiv="Cache-Control" content="no-cache, no-store, must-revalidate">
<meta http-equiv="Pragma" content="no-cache">
<meta http-equiv="Expires" content="0">