问题描述
只存在于FireFox(从3.6到现在的9)上,其他浏览器都很好。我的代码如下所示:
jQuery.extend({
AnchorFromUrl:function(url){
var anchor = url.substr(1).replace('。html','');
$ .fizzer_anchor = anchor;
window.location.hash = anchor;
return anchor;
}
});
最奇怪的是,如果我在window.location.hash = anchor之前放置一个alert,行,点击确定图标后不会消失,删除该警报(),你会得到你的图标消失。
注意:如果你只是做 window.location = something
。
每隔一段时间,Firefox会丢弃一个favicon或拒绝将favicon放在我的书签旁边。我想这是一个Firefox的bug。
为了解决这个问题(和其他功能),我安装了。当然,这并不能解决你在其他计算机上的问题,比如客户端等等。
Problem exists only on FireFox (from 3.6 up to current 9), other browsers are fine. My code looks like this:
jQuery.extend({
AnchorFromUrl : function(url) {
var anchor = url.substr(1).replace('.html','');
$.fizzer_anchor = anchor;
window.location.hash = anchor;
return anchor;
}
});
The most weird thing is that if I place an alert before the window.location.hash = anchor; line, after clicking Ok favicon doesn't disappear, remove that alert() and you get your favicon disappearing.
Note: it also drops the favicon if you just do window.location = something
.
I noticed this behaviour, too. Every now and then Firefox drops a favicon or it refuses to put the favicon alongside my bookmark. I think this is a Firefox bug.
To workaround this (and for other functionality), I installed the Favicon Picker add-on. Of course, this doesn't solve your problem on other computers, like clients and the like.
这篇关于当改变window.location时,FireFox 3.6 - 9下载favicon的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!