Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
2.3k views
in Technique[技术] by (71.8m points)

微信公众号嵌套h5页面每次更新的缓存怎么清理

微信公众号里面嵌套的h5页面每次更新以后线上都没用反应,是因为微信自带的缓存,文件名不变的话微信不会从新加载文件,必须手动进设置里清除缓存,但是用户并不会这样的操作,请问怎么在h5页面清除微信缓存


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

方法有很多, 推荐一个最简单的, 也是大部分都在用的
就是给文件加随机数(哈希值),每次打包后的哈希值都不一样, 浏览器自然会拿新的


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...