本文介绍了使用JS进行Chrome Hard Reload的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们已经开发了一个基于AungularJS浏览器的应用程序,并与一个客户端(来自客户端的一群人)进行了测试,很难说服他们,如何清空缓存并重新加载"(按F12键,然后按右上角点击刷新"按钮,然后选择-清空缓存并进行硬加载",

We have developed an AungularJS browser based app and testing with a Client (a group of people from client side), it is hard to convince them, how to "Empty Cache and Hard Reload" (Press F12, then on top right click on Refresh button and choose -Empty Cache and Hard Reload),

目前,我们仅在Chrome浏览器上进行测试,有什么方法可以使用JS进行操作,要求按硬重置按钮"(例如document.location.reload(true);)

For the time, we are testing only on Chrome browser, is there any way to do that using JS, ask to press "Hard reset button" (like document.location.reload(true);)

推荐答案

您无权(很高兴)访问自己的页面之外,因此无法在自己的页面窗口之外单击以单击刷新按钮.

You don't have access outside your own page (gladly), so you cant click outside your own page window to click on the refresh button.

最好的办法是设置html标签,以使浏览器知道它可能不使用缓存.

The best thing you can do is set html tags to let the browser know that it don't may use caching.

在您的<head> </head>

<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="expires" content="mon, 22 jul 2002 11:12:01 GMT">
<meta http-equiv="pragma" content="no-cache">

这篇关于使用JS进行Chrome Hard Reload的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-20 00:53