FireFox 3.6 - 9 drops favicon when changing [removed]

后端 未结 3 1385
悲&欢浪女
悲&欢浪女 2021-02-02 17:43

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) {
         


        
3条回答
  •  情深已故
    2021-02-02 18:42

    It worked for me :

    var link = document.createElement('link');
    link.type = 'image/x-icon';
    link.rel = 'shortcut icon';
    link.href = 'FAV_ICON_URL';
    document.getElementsByTagName('head')[0].appendChild(link);
    

    Refer : Changing Website Icon Dynamically

提交回复
热议问题