为什么我的图标没有出现在 IE7/8 中?
感兴趣的页面:https://www.gsb-yourbank.com/test/
ICO文件:https://www.gsb-yourbank.com/test/favicon.ico< /a>
我的图标是 16x16 分辨率、16 色 ICO 文件。无论我做什么,它都不会出现在 IE 7/8 中!我已经尝试了我能想到的一切,包括:
- 用各种方式生成 ICO 不同的实用程序,
- 更改文档头中 favicon 链接元素的语法,
- 在 favicon 中使用绝对、相对和根相对 URL 链接元素,
- 使用 PNG 而不是 ICO 文件,
- 确保我以二进制模式通过 FTP 上传文件,
作为一名长期的 Web 开发人员/程序员,我不敢相信这会让我绊倒。任何帮助将不胜感激。
Page of interest: https://www.gsb-yourbank.com/test/
ICO file: https://www.gsb-yourbank.com/test/favicon.ico
My favicon is a 16x16 resolution, 16-color ICO file. It will not appear in IE 7/8 no matter what I do! I've tried everything I can think of, including:
- generating the ICO with a variety of
different utilities, - changing the syntax of the favicon link elements in the document head,
- using absolute, relative, and root-relative URLs in the favicon
link elements, - using a PNG instead of an ICO file,
- ensuring that I am uploading the file via FTP in binary mode,
As a longtime web developer/programmer, I can't believe that this is tripping me up. Any help would be greatly appreciated.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
最初的 IE 规范规定,IE 支持的书签图标扩展会在网站的根目录(即 www.example.com/favicon.ico)中查找名为“favicon.ico”的文件,该文件应该是一个图标文件。
Mozilla 接受了此规范,但将其扩展为在 html 文档中使用标签,以便可以使用任何文件,并且在访问站点时在地址栏旁边显示书签图标。 Mozilla 随后将其作为新的标准规范提交,声明可以使用任何 16x16 图像文件。然后,Mozilla 编写了自己的浏览器来接受任何尺寸的图像,因此遵循提议标准的浏览器可能会在 Mozilla/Firefox 显示正常的网站上崩溃。
这称为“开放”标准。
The original IE specification stated the bookmark icon extension supported by IE would look for a file called "favicon.ico", which should be an icon file, in the root of the website, i.e. www.example.com/favicon.ico.
Mozilla embraced this specification, but extended it to use a tag in the html document so that any file could be used, and had the bookmark icon appear beside the address bar when visiting the site. Mozilla then submitted this as a new standard specification, stating that any 16x16 image file could be used. Then Mozilla wrote their owner browser to accept images of any size, so that browsers following the proposed standard could break on sites that Mozilla/Firefox displayed just fine.
This is called an "open" standard.
在您放置网站图标之前,请确保您使用的 IE 没有缓存该网站没有的事实。听起来很愚蠢,但这确实发生了。在这种情况下,清除缓存/重新启动浏览器应该可以解决问题。
Make sure that the IE you're using hasn't cached the fact that the site didn't have a favicon before you put one there. It sounds dumb, but this actually happens. Clearing cache/restarting the browser should solve it in that case.