有没有办法使用Javascript进行Ctrl-F5刷新? [英] Is there any way to use Javascript to do a Ctrl-F5 refresh?

查看:148
本文介绍了有没有办法使用Javascript进行Ctrl-F5刷新?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个在框架内运行的小asp文件。有什么方法可以做 CTRL + F5 类型的刷新并重新加载整个浏览器窗口。我已经尝试过 parent.location.reload(true) location.reload()以及其他一些其他人。页面似乎不想重定向。如果我在键盘上执行 CTRL + F5 ,它会重新加载。非常感谢任何帮助

I have a small asp file that runs inside of a frame. Is there any way that i can do a CTRL+F5 type of refresh and reload the whole browser window. I've tried parent.location.reload(true), location.reload(), and quite a few others. The page doesnt seem to want to redirect. If i do a CTRL+F5 on my keyboard it reloads fine. Any help is much appreciated

我还需要通过 CTRL + F5在浏览器中刷新/更新我的.js文件

推荐答案

在你的< head> 标记放在以下两行

Try following, FIrst of all in your <head> tag put following two lines

<meta http-equiv="Cache-control" content="no-cache">
<meta http-equiv="Expires" content="-1">

然后你可以使用 location.reload(true)

这篇关于有没有办法使用Javascript进行Ctrl-F5刷新?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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