Why isn't my favicon appearing in IE7/8?

会有一股神秘感。 提交于 2019-12-20 04:16:54

问题


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.


回答1:


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.




回答2:


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.



来源:https://stackoverflow.com/questions/2931533/why-isnt-my-favicon-appearing-in-ie7-8

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!