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
712 views
in Technique[技术] by (71.8m points)

修改外部引用css代码之后重新部署,在浏览器清除了缓存的情况下,引用的css代码没有改变?

html页面部署在服务器上后,有外部css,js的引用,修改外部引用css代码之后重新部署,在浏览器清除了缓存的情况下,引用的css代码没有改变,引用地址为//app.XXX这种,http和https会有影响吗?怎么改可以保证部署之上后css及时更改?就是html页面,没用webpack打包什么的,微信打开也有不同步问题?


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

1 Answer

0 votes
by (71.8m points)

http服务器上请求头是设置no-cache参数,要求客户端每次加载资源的时候通过资源的tag值比较是否有更新,是否需要加载最新版本


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

2.1m questions

2.1m answers

60 comments

57.0k users

...