Firefox中与JavaScript事件相关的F5和Ctrl-F5有何区别? [英] What's the difference between F5 and Ctrl-F5 in Firefox related to JavaScript events?

查看:102
本文介绍了Firefox中与JavaScript事件相关的F5和Ctrl-F5有何区别?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

尝试此公共页面时:.因此,如果您的菜单取决于某些属性,则可以通过单击 CTRL + F5 硬刷新.

When you try this public page: http://slim.nl/shop/default.aspx (update: meanwhile this site has changed such that this question's behavior cannot be tested anymore there), you'll notice a menubar. If you hit F5, the menu in that bar disappears. Same when you come to that page via the Back-button in your browser. It only happens on Firefox (seen on versions 3-7). Using Ctrl-F5, the menubar reappears.

To the best of my knowledge, all JavaScript events that fire when loading a page, including any AJAX cycles, should also fire when refreshing a page with F5 or coming there via the Back-button. What's happening here?

I'd like to know from a programmer's standpoint what the difference is between F5 and Ctrl-F5, preferably more general than just this case. Unless it's a bug in Firefox, of course.

解决方案

Firefox caches not only loaded files but changes made to page( user input and even changes to attributes made by JavaScript). Check this. So if your menu depends on some attributes you can just hard-refresh by clicking CTRL+F5.

这篇关于Firefox中与JavaScript事件相关的F5和Ctrl-F5有何区别?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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