另一个“为什么我的 Favicon 不显示?" [英] Yet Another "Why isn't my Favicon showing?"

查看:39
本文介绍了另一个“为什么我的 Favicon 不显示?"的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述


我刚刚尝试再次将我的网站固定"到任务栏(删除它后)但是当我在地址栏中的 16x16px 图标上单击并按住鼠标按钮时(见下图),您可以看到我的网站图标被拖动用鼠标 - 所以 Internet Explorer 找到并得到了图标 - 它只是没有在所有正确的地方显示它!还更新了下面的代码:


I have just tried "Pinning" my site to the Taskbar again (after removing it) but when I clicked and held down the mouse button on the 16x16px icon inside the address bar (see pic below), you can see my favicon being dragged around with the mouse - so internet explorer has found and got the icon - it's just not displaying it in all the right places! Also updated code below:

正如标题所暗示的,我无法显示我的收藏夹图标;在任何浏览器的任何版本中.但是,有 1 个例外 - 这还不够好:

As the title suggests, I can't get my favicon to display; in any version of any browser. There is 1 exception, though - which isn't good enough:

IE 9 和 IE 10 -

IE 9 and IE 10 -

正如您在上面的屏幕截图中可能看到的那样,唯一我看到我的收藏夹图标的时间是在我将它添加到我的收藏夹文件夹并打开收藏夹栏之后.图标不会显示在选项卡中(页面标题旁边),它不会显示在任务栏区域中,并且如果我有已将我的网站固定到任务栏.

As you can probably see in the screenshot above, the only time I get to see my favicon is after I've added it to my Favorites folder and opened the Favorites Bar. The favicon does not display in the Tab (next to the page title), it does not display in the Taskbar area, and it does not display up the top-left of the browser window if I have "Pinned" my site to the Taskbar.

在其他所有浏览器中,它根本不显示.

In every other browser, it simply does not display at all.

我已经尝试了我可以在网上找到的所有可能的解决方案".

I have tried every possible "solution" that I could find online.

这是我的代码:

    <link rel="icon" type="image/x-icon" href="http://www.mysite.com/favicon.ico"><!-- Major Browsers -->
    <!--[if IE]><link rel="shortcut icon" href="http://www.mysite.com/favicon.ico"/><![endif]--><!-- Internet Explorer-->

我还尝试了所有常见的图标大小;16x1632x3264x64128x128256x256 - 我什至尝试将所有尺寸保存在同一个 *.ico 文件中.

I have also tried all common sizes for the favicon; 16x16, 32x32, 64x64, 128x128 and 256x256 - and I've even tried saving all sizes within the same *.ico file.

我尝试删除 *.ico 文件的缓存文件.

I have tried deleting the cache file for *.ico files.

没有任何效果.完全相同的代码以前在我制作的其他网站上工作过.我不明白.什么给?

Nothing has worked. The exact same code has previously worked on other sites that I've made. I don't get it. What gives?

推荐答案

我已经编辑了这个答案,只留下问题的解决方案.

使用:<link rel="shortcut icon" href="{ICONURL}"/>

代替:

这篇关于另一个“为什么我的 Favicon 不显示?"的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆