强制浏览器使用新的CSS [英] Force browser to use new CSS

查看:344
本文介绍了强制浏览器使用新的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的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆