favicon没有在IE8中显示 [英] favicon not showing in IE8

查看:71
本文介绍了favicon没有在IE8中显示的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

亲爱的所有人,

我正在建立一个网站,并且我遇到了这个问题,我的网站上没有显示图标。这是当用户将其添加到收藏夹时显示的图标,并且当打开多个页面时也显示在选项卡中。此外,它还显示在地址栏中。这就是我所做的。

1 - 制作一个狂野的.ico文件名"favicon.ico"。文件。
2 - 将它放在index.html所在的根目录中。

上面不起作用所以我试着用(X)HTML代码把它作为

1 - < link rel ="快捷图标" HREF =" /favicon.ico" />
2 - < link rel =" icon"类型= QUOT;图像/ vnd.microsoft.icon" HREF =" /somepath/image.ico" />
3 - < link rel ="快捷图标"类型= QUOT;图像/ X-图标" HREF =" /favicon.png" />
4 - < link rel =" icon"类型= QUOT;图像/ X-图标" HREF =" /favicon.png" />
5 - < link rel ="快捷方式图标"类型= QUOT;图像/ X-图标" HREF =" /favicon.ico" />
6 - < link rel =" icon"类型= QUOT;图像/ X-图标" HREF =" /favicon.ico" />
7 - < link rel =" icon"类型= QUOT;图像/ vnd.microsoft.icon" HREF ="&的favicon.ico QUOT; />
8 - < link rel ="快捷图标"类型= QUOT;图像/ X-图标" HREF ="&的favicon.ico QUOT; />
9 - < link rel ="快捷图标"类型= QUOT;图像/ X-图标" HREF ="&的favicon.ico QUOT; />
10 - < link rel ="快捷图标"类型= QUOT;图像/ X-图标" HREF =" ... /&的favicon.ico QUOT; />

这是维基百科上显示的内容

Internet Explorer的格式略有不同。

< link rel =" SHORTCUT ICON&qu​​ot; href =" http://www.mydomain.com/myicon.ico" />

另外,以下内容也可以接受:

< link rel =" SHORTCUT ICON&qu​​ot; href =" /somepath/myicon.ico" />

我已经尝试了以上所有以及以下内容。

1 - 删除IE缓存&临时互联网文件(TIF)。
2 - 上网并用www和外出www。 - 在图像托管上托管jpg,png和gif格式的图像文件网站并编辑href。

似乎没什么用。 IE8是否不支持favicon.ico

任何帮助将不胜感激。

解决方案



你使用< base> head块中其他位置的标记?

对于最一致的结果,请使用域根文件夹中favicon.ico文件的绝对路径。

< link href = " http://yourdomain/favicon.ico" rel = "快捷图标" 类型 = " image / x-icon" />

(使用https位置在安全站点上)

在默认情况下,浏览器还会在域的根文件夹中查找名为favicon.ico的文件,如果未使用链接标记指定,则将此文件用作页面图标点。


Dear All,

I am building a web site and am stuck with this issue where the icon does not show for my web site. This is the icon that is suppose to display when a user adds it to Favorites and also shows in the tab when multiple pages are open. Further more it is also shown in the address bar. Here is what I have done.

1 - Make a wild .ico file names "favicon.ico" file.
2 - Put it in the root directory where index.html resides.

The above does not work so I tried puting it by (X)HTML code as

1 - <link rel="shortcut icon" href="/favicon.ico" />
2 - <link rel="icon" type="image/vnd.microsoft.icon" href="/somepath/image.ico" />
3 - <link rel="shortcut icon" type="image/x-icon" href="/favicon.png" />
4 - <link rel="icon" type="image/x-icon" href="/favicon.png" />
5 - <link rel="shortcut icon" type="image/x-icon" href="/favicon.ico" />
6 - <link rel="icon" type="image/x-icon" href="/favicon.ico" />
7 - <link rel="icon" type="image/vnd.microsoft.icon" href="favicon.ico" />
8 - <link rel="shortcut icon" type="image/x-icon" href="favicon.ico" />
9 - <link rel="shortcut icon" type="image/x-icon" href="favicon.ico" />
10 - <link rel="shortcut icon" type="image/x-icon" href=".../favicon.ico" />

This is what is shown on wikipedia

Internet Explorer has a slightly different format.

  <link rel="SHORTCUT ICON" href="http://www.mydomain.com/myicon.ico"/>

Additionally the following is also acceptable:
 
  <link rel="SHORTCUT ICON" href="/somepath/myicon.ico"/>

I have tried all the above and also the below ones.

1 - Deleting the IE cache & Temp Internet Files (TIF).
2 - Putting on the web and tring it with www and with out www.
3 - Host an image file in the format of jpg, png and gif on an image hosting site and edit the href.

Nothing seems to work. Does IE8 not support favicon.ico

Any help will be much appreciated.


解决方案

Hi,

are you using the <base> tag elsewhere in your head block?

For the most consistant results use an absolute path to the favicon.ico file in your domain root folder.

<link href="http://yourdomain/favicon.ico" rel="shortcut icon" type="image/x-icon" />

(use a https location on secure sites)


By default, browsers will also look in the domain's root folder for a file called favicon.ico and if not specified with a link tag will use this file as the page favicon.


这篇关于favicon没有在IE8中显示的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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