【发布时间】:2014-07-30 07:33:20
【问题描述】:
为什么此网页上的图标在 IE10 及更低版本中不起作用?网页是here。它适用于 IE11 以及其他主要浏览器。
这是页面顶部的代码:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html dir="ltr" xmlns="http://www.w3.org/1999/xhtml" lang="en">
<head>
<title>...</title>
<meta http-equiv="X-UA-Compatible" content="IE=8,IE=9" >
<!-- (various stylesheet, script, and meta declarations) -->
<link rel="Shortcut Icon" href="/riteAid-theme/images/custom/riteaid.ico" />
<!-- (more stylesheets and scripts) -->
<link rel="canonical" href="..." />
</head>
我尝试过的事情(无济于事):
- 在链接声明中设置
type="image/x-icon"。 - 在链接声明中设置
rel="icon"。 - 将声明设置在头部更高的位置。
- 将图标名称更改为
favicon.ico
我在尝试之间使用了一个新的虚拟机实例,所以缓存不是问题。
【问题讨论】:
-
您是否尝试过将 rel 小写(不知道这是否真的会有所作为)?这是我通常使用的声明,它适用于所有浏览器:
<link rel="shortcut icon" href=".../favicon.ico">。它也可能是一个编码错误的 .ico 文件。您也可以随时为图片使用 .png
标签: html internet-explorer-8 internet-explorer-9 internet-explorer-10 favicon