本文介绍了强制浏览器使用新的CSS的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
有没有一种方法来检查用户是否有不同的版本,通过他们的浏览器缓存的CSS,如果是这样强迫自己的浏览器来拉新版本吗?
Is there a way to check if the user has a different version of the CSS cached by their browser and if so force their browser to pull the new version?
推荐答案我不知道这是否是正确的用法,但我认为你可以使用查询字符串强制css文件的重新加载:
I don´t know if it is correct usage, but I think you can force a reload of the css file using a query string:
<link href="mystyle.css?SOME_UNIQUE_TEXT" type="text/css" rel="stylesheet" />我记得我几年前用这个方法来强制网络摄像图像的重装,但时间可能已经移动了......
I remember I used this method years ago to force a reload of a web-cam image, but time has probably moved on...
更多推荐
强制浏览器使用新的CSS
发布评论