强制Firefox重新加载后退按钮上的页面 [英] Force Firefox to Reload Page on Back Button

查看:152
本文介绍了强制Firefox重新加载后退按钮上的页面的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何让Firefox重新运行JavaScript,并在用户按下后退按钮时重新加载整个页面?我可以通过添加以下代码在除Firefox之外的所有浏览器中执行此操作:

  history.navigationMode ='兼容'; 
$(body)。unload(function(){})

添加一个iFrame ...但是这在Firefox中不起作用。有什么可以做的?

解决方案

在你的HEAD标签之间添加这个标签

 < META HTTP-EQUIV =PragmaCONTENT =no-cache> 
< META HTTP-EQUIV =ExpiresCONTENT = - 1>


How do you make Firefox rerun javascript and reload the entire page when the user presses the back button? I was able to do this in all browsers except Firefox from the help of another SO question by adding this code:

history.navigationMode = 'compatible';
$("body").unload(function(){})

And also adding an iFrame... But this doesn't work in Firefox. Is there anything to do?

解决方案

add this between your HEAD tags

<META HTTP-EQUIV="Pragma" CONTENT="no-cache">
<META HTTP-EQUIV="Expires" CONTENT="-1">

这篇关于强制Firefox重新加载后退按钮上的页面的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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