微信内置浏览器总是缓存网页内容解决思路

写评论

微信内置浏览器总是缓存网页内容解决思路

卷心菜 卷心菜
摘要 1.页面引用的静态资源增加版本号信息 比如旧 xx.js?version=1.0 新xx.js?version=2.0 2. 在页面html头部添加如下head ```html <meta http-equiv="cache-cont

1.页面引用的静态资源增加版本号信息

比如旧 xx.js?version=1.0 新xx.js?version=2.0

  1. 在页面html头部添加如下head
<meta http-equiv="cache-control" content="max-age=0" />
<meta http-equiv="cache-control" content="no-cache" />
<meta http-equiv="expires" content="0" />
<meta http-equiv="expires" content="Tue, 01 Jan 1970 1:
剩余内容需要登录才能阅读

登录 后才能评论~