when developing a web site features, due to the session cache is not cleared in time. Began a series of exploration.
code is as follows:


<! DOCTYPE
HTML>
<Html>
<Head>
<Meta charset="utf-8"/>
</head>
<Body>
<Iframe SRC="http://www.script-home.com//web/frame.html" ></iframe>
<Img SRC="http://www.script-home.com//web/index.jpg"/>
<Script SRC="http://www.script-home.com//web/index.js" ></script>
</body>
</html>

frame page frame. The HTML source code to the

  code is as follows:  


<! DOCTYPE
HTML>
<Html>
<Head>
<Meta charset="utf-8"/>
</head>
<Body>
<Img SRC="http://www.script-home.com//web/frame.jpg"/>
<Script SRC="http://www.script-home.com//web/frame.js" ></script>
</body>
</html>

code is as follows:


//keydown event has occurred in the main window browser binding
the location
=="chrome://browser/content/the xul" & &
addEventListener("keydown",
function (event)
{
//如果按下了CTRL+F5
if (event.which
===116 &&event.ctrlKey) {
//阻止冒泡和默认操作,主要是阻止默认的刷新动作.否则会刷两次
event.preventDefault();
event.stopPropagation();
(function (content)
{
//为当前标签绑上DOMContentLoaded事件,在主页面DOM加载完成后,刷新各个框架
gBrowser.mCurrentBrowser.addEventListener("DOMContentLoaded",
function self()
{
//解绑DOMContentLoaded事件
this.removeEventListener("DOMContentLoaded",
self, false);
//遍历刷新所有框架
Array.prototype.slice.call(content.frames).forEach(function (win)
{
//跳过缓存刷新
win.location.reload(true);
})
},
false);
//开始刷新主页面
content.location.reload(true);
})(content)
}
//捕获模式,第一时间触发事件处理函数.
},
true)

安装该扩展后,按下CTRL+F5能像IE一样,让所有的框架页面全都跳过缓存刷新.至于多层框架(框架中的框架),这个扩展不适用,我觉的各位程序员不会那么倒霉.# 0 - #


This concludes the body part