If I serve /favicon.ico as image/vnd.microsoft.icon, instead of image/x-icon, will it break on any browsers?

可紊 提交于 2019-11-30 23:41:44

问题


If I configure Apache to serve /favicon.ico as MIME type image/vnd.microsoft.icon, instead of image/x-icon, will it break on any browsers? Wikipedia's favicon article indicates that image/vnd.microsoft.icon is the "correct" mime type, but that doesn't help if it means some users won't see it.

I need to support IE6+, as well as modern browsers (FF/Chrome/Opera/Safari).


回答1:


Google serve /favicon.ico as image/x-icon, and I'd guess they know what they're talking about (or at least, what's compatible).




回答2:


Off the top of my head, image/vnd.microsoft.icon will work only if the image actually is a real ICO file, while image/x-icon is less fussy, and will also work for bitmaps and GIF images. (Non-ICO files with the .ico file extension are, I believe, quite common.)



来源:https://stackoverflow.com/questions/1444975/if-i-serve-favicon-ico-as-image-vnd-microsoft-icon-instead-of-image-x-icon-wi

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