jQuery中的Ctrl + F5清除浏览器缓存 [英] Ctrl + F5 in jquery to clear browser cache

查看:290
本文介绍了jQuery中的Ctrl + F5清除浏览器缓存的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何像两次按f5一样在jquery中深度刷新窗口.目前,我正在使用它.

How to deep refresh window in jquery like you press f5 twice.currently i m using this.

<script>
window.onload = function() {
if(!window.location.hash) {
    window.location = window.location + '#loaded';
    window.location.reload();
}
}
</script>

谢谢!并且不需要花费很多时间来刷新. 我的网页在php中.

Thanks ! and it should not take much time to refresh. my webpage is in php.

推荐答案

我认为reload函数可以采用强制完全刷新的参数. 即:

I think the reload function can take an argument that forces full refresh. ie:

window.location.reload(true);

供参考: https://developer.mozilla.org/zh-CN/docs/Web/API/Location/reload

这篇关于jQuery中的Ctrl + F5清除浏览器缓存的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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