我怎么可以强制硬刷新(CTRL + F5)? [英] How can I force a hard refresh (ctrl+F5)?

查看:1005
本文介绍了我怎么可以强制硬刷新(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)?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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