【发布时间】:2010-10-19 17:21:07
【问题描述】:
我为我的网站定义了一个最喜欢的图标:
<link rel="shortcut icon" type="image/x-icon" href="favicon.ico">
在我添加图标后访问过该网站的任何浏览器都可以正常显示网站图标。但是我自己的浏览器拒绝显示图标。
我已经尝试了我能想到的所有链接变体:
<link rel="shortcut icon" type="image/x-icon" href="favicon.ico">
<link rel="shortcut icon" type="image/x-icon" href="http://example.com/favicon.ico">
<link rel="icon" type="image/x-icon" href="favicon.ico">
<link rel="icon" type="image/x-icon" href="http://example.com/favicon.ico">
<link rel="shortcut icon" type="image/x-icon" href="favicon.ico">
<link rel="icon" type="image/x-icon" href="favicon.ico">
<link rel="shortcut icon" type="image/x-icon" href="http://example.com/favicon.ico">
<link rel="icon" type="image/x-icon" href="http://example.com/favicon.ico">
<link rel="shortcut icon" type="image/x-icon" href="renamed.ico">
没关系,Internet Explorer (9) 甚至拒绝尝试从服务器获取数据(来自 fiddler 的监控)。
我已经多次尝试清除缓存:
(gear) -> Internet Options -> General -> Delete -> Temporary Internet Files
Alex in this answer 认为收藏图标的缓存方式与常规 Web 内容不同,并且不遵循常规清除规则。
那么问题就变成了:如何清除 Internet Explorer 最喜欢的图标缓存?
另见
- MSDN: How to Add a Shortcut Icon to a Web Page
- Why isn't my favicon appearing in IE7/8?
- favicon not working in IE
- How do I force a favicon refresh
- Cannot get Favicon.ico to display
- Another favicon not working in IE
- Favicon not showing, my icon is no good
- favicon.ico cannot show on Internet explorer 7
- Why doesn't my favicon display for my web site?
- Favicon not showing, my icon is no good
【问题讨论】:
-
你试过重装IE9吗? ;)
-
你试过
favicon.ico?xyz=123456吗?编辑:哦,你已经重命名了图标。那没关系 -
你能显示一个实时网址吗? IE9 甚至不再使用 Favicon 了吗? (例如 Chrome 没有)
-
我从不同的 IE9 浏览同一页面,它出现了;就像在 Firefox 和 Chrome 中一样。这是此计算机上此浏览器特有的内容(即缓存)
-
@Pekka 实际上,你赢了。添加
favicon.ico?adsfadf使IE 执行命中(当然是404)。但是当我把它放回favicon.ico时,图标出现了! +1。现在将其粘贴到答案中。
标签: internet-explorer caching favicon