Welcome to MLink Developer Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

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

这是我看某个网站的源代码,发现引用的每个字体文件后面,都带一个问号加一串参数,这样的作用是什么?

src: url("../font/fontello.eot?6946176#iefix") format('embedded-opentype'), url("../font/fontello.woff?6946176") format('woff'), url("../font/fontello.ttf?6946176") format('truetype'), url("../font/fontello.svg?6946176#fontello") format('svg');
直接引用,不加?之后的一串参数,可以吗?


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

1 Answer

0 votes
by (71.8m points)

防止缓存,每一次请求,服务器都会认为是一次新的请求,所以返回最新的内容,而不是缓存的内容


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to MLink Developer Q&A Community for programmer and developer-Open, Learning and Share
...