升级了一下版本,竟然不能用了,查了一下,原来是文件名大小写的问题…
插件目录的chrome.manifest
overlay chrome://browser/content/browser.xul chrome://dnsFlusher/content/dnsFlusher.xul
#这里应当改成
#overlay chrome://browser/content/browser.xul chrome://dnsFlusher/content/dnsflusher.xul
overlay chrome://navigator/content/navigator.xul chrome://dnsFlusher/content/dnsFlusher.xul
#应当改成
#overlay chrome://navigator/content/navigator.xul chrome://dnsFlusher/content/dnsflusher.xul
content dnsFlusher chrome/content/dnsFlusher/
skin dnsFlusher classic/1.0 chrome/skin/classic/dnsFlusher/
Copy Code
修改之后重启firefox就可以了
作者肯定是用win系统,文件名不区分大小写,所以不会有问题,其他linux,mac就会找不到文件了..
测试环境: firefox3.0 – 3.5
强大的qa同学,连favicon都照顾到了,具体情况:有个页面刚进去的时候时kaixin网的favicon,加载完毕是人人网的favicon~
demo:http://bluehua.org/demo/favicon_firefox.html
<html>
<head>
<link href="http://www.google.cn/favicon.ico" rel="shortcut icon" type="image/x-icon" />
</head>
<body>
<script>
window.location.href = '#fdsafasd';
</script>
</body>
</html>
Copy Code |
Run Code
页面加载过程中,如果使用脚本修改锚点,firefox便会到server的根目录取默认的favicon.ico,如果取不到就变空了,如果取到了,但跟指定的favicon不一样,情况就跟qa同学看到的一样,更神奇了..
但是发现像下面这样window.onload时改变锚点没有问题
demo:http://bluehua.org/demo/favicon_firefox_onload.html
<html>
<head>
<link href="http://www.google.cn/favicon.ico" rel="shortcut icon" type="image/x-icon" />
</head>
<body>
<script>
window.onload=function()
{
window.location.href = '#fdsafasd';
};
</script>
</body>
</html> Copy Code |
Run Code
如果您恰好使用了ff浏览器(偶用ff3.0),server端使用了nginx作代理,而某个ajax又恰好传了一个为null的数据,您就会看到这个错误
firefox下点run code运行下面代码,firebug 看控制台
<html>
<input type="button" value="send null ajax" onclick="send();" />
</html>
<script>
function send()
{
var rq = new XMLHttpRequest();
rq.open("POST", "http://bluehua.org/index.php", true);
rq.send( null );
}
</script> Copy Code |
Run Code
两种解决方法:
client side : rq.send( data ) -> rq.send( data || ” );
server side : http://rocky.blog.kingtch.com/2008/11/28/fix_nginx_411_length_required/
y,自从用了vim,该让机器做的都让机器做了。。
这个东东的原理是这样滴,firefox安装一个插件,起作用的就下面几行
var file = Components.classes["@mozilla.org/file/local;1"].createInstance(Components.interfaces.nsILocalFile);
file.initWithPath("/tmp/refresh.firefox");
//浏览器开启时启动一个定时器
var timer = setInterval(function()
{
//每隔0.1秒检测一下这个文件存在否
if ( file.exists() )
{
//如果存在,删除之
file.remove(true);
//获取当前标签的文档对象
var doc = gBrowser.selectedBrowser.contentDocument;
//是否是在调试的东东
if ( /(xiaonei\.com|kaixin\.com)/.test( doc.location.href ) )
{
//如果是,调用dnsFluher,刷新host,如果没有安装此插件就算了
dnsFluher.refreshdns();
//刷新页面
doc.location.reload();
}
}
},100 ); Copy Code
所以,只要在/tmp/目录生成一个refresh.firefox的文件,firefox便会刷新了
vim 里添加一行配置文件
"更改host文件时刷新
autocmd BufWritePost,FileWritePost /etc/hosts execute '!echo '' > /tmp/refresh.firefox'
"更改调试文件时刷新
autocmd BufWritePost,FileWritePost */jspro/*.js execute '!echo '' > /tmp/refresh.firefox'
Copy Code
插件附上,根据情况自行修改。。
autorefresh1.0
扩展名改成xpi拖到firefox就可以安装了