强制浏览器使用新的CSS

编程入门 行业动态 更新时间:2024-10-26 12:33:37
本文介绍了强制浏览器使用新的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

本文发布于:2023-11-01 20:38:40,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1550355.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:浏览器   CSS

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!