我怎么可以强制硬刷新(CTRL + F5)?

编程入门 行业动态 更新时间:2024-10-14 18:21:20
本文介绍了我怎么可以强制硬刷新(CTRL + F5)?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我们正在积极开发使用.NET和MVC一个网站,我们的测试是具有适合想获得最新的东西来测试。我们修改样式表或外部JavaScript文件每次,测试人员需要做硬刷新(Ctrl + F5键在IE浏览器),才能看到最新的东西。

We are actively developing a website using .Net and MVC and our testers are having fits trying to get the latest stuff to test. Every time we modify the style sheet or external javascript files, testers need to do a hard refresh (ctrl+F5 in IE) in order to see the latest stuff.

是否有可能对我来说,迫使他们的浏览器来获得这些文件,而不是他们依靠自己的缓存版本的最新版本?我们没有做任何形式的由IIS或任何特殊的缓存。

Is it possible for me to force their browsers to get the latest version of these files instead of them relying on their cached versions? We're not doing any kind of special caching from IIS or anything.

在此投产,这将是很难说,他们需要努力的刷新,以查看最新更改的客户端。

Once this goes into production, it will be hard to tell clients that they need to hard refresh in order to see the latest changes.

谢谢!

推荐答案

您需要修改你指的是外部文件的名称。对于如添加版本号在每个文件的结尾,如风格-1423.css并使编号构建自动化的一部分,以便这些文件和参考文献都部署每次一个唯一的名称。

You need to modify the names of the external files you refer to. For e.g. add the build number at the end of each file, like style-1423.css and make the numbering a part of your build automation so that the files and the references are deployed with a unique name each time.

更多推荐

我怎么可以强制硬刷新(CTRL + F5)?

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

发布评论

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

>www.elefans.com

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