为什么我的收藏夹图标不起作用? [英] Why isn't my favicon working?

查看:128
本文介绍了为什么我的收藏夹图标不起作用?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

现在我知道围绕SO存在很多类似的问题,但是我认为我已经涵盖了所有基础知识.这就是我所知道的:

可通过/favicon.ico访问我的收藏夹图标(完整链接)

HTML是(页面URL ):

<link rel="icon" href="http://www.bandcmotors.co.uk/favicon.ico" type="image/x-icon" />
<link rel="shortcut icon" href="http://www.bandcmotors.co.uk/favicon.ico" type="image/x-icon" />

我也尝试过相对和绝对版本.没有爱.

HTTP响应标头:

Date: Mon, 22 Dec 2008 15:07:34 GMT
Server: Cherokee
Etag: 494bc264=57e
Last-Modified: Fri, 19 Dec 2008 15:48:52 GMT
Content-Type: image/x-icon
Content-Length: 1406

200 OK

图标在浏览器中可以很好地加载,并且我已经清除了缓存,但是在地址栏或标签中仍然看不到该图标.在Firefox或IE上.

我到底在做错什么?

编辑1.我使用了验证器,它对我很有帮助它无法下载.考虑到我可以很好地下载它,这很奇怪...如果有人可以解释一下,则可能会帮助解决问题.

编辑2.我只是将计算机踢了一下,重新启动,然后一切正常.我讨厌拒绝正确清除自身的缓存**** ********> =(

解决方案

它工作正常,您的浏览器可能出于某种原因对其进行了缓存.

顺便说一句,在这种情况下,不建议使用ETag,最好只使用"Expires:"标头...

Now I know there are a lot of similar questions around SO but I think I've covered all the basics. Here's what I know:

My favicon is accessible through /favicon.ico (full link)

The HTML is (page URL):

<link rel="icon" href="http://www.bandcmotors.co.uk/favicon.ico" type="image/x-icon" />
<link rel="shortcut icon" href="http://www.bandcmotors.co.uk/favicon.ico" type="image/x-icon" />

I've tried relative and absolute versions too. No love.

The HTTP response headers:

Date: Mon, 22 Dec 2008 15:07:34 GMT
Server: Cherokee
Etag: 494bc264=57e
Last-Modified: Fri, 19 Dec 2008 15:48:52 GMT
Content-Type: image/x-icon
Content-Length: 1406

200 OK

The icon loads fine in a browser and I've cleared my cache but I still can't see the icon in the address bar or tab. On either Firefox or IE.

What on earth am I doing wrong?

Edit 1. I used a validator and it rather helpfully told me that it could not download it. Rather odd considering I can download it fine... If anybody could explain that, it might help fix the problem.

Edit 2. I just drop-kicked my computer, restarted and it all worked. I hate caches that refuse to clear themselves properly ****grumbles**** >=(

解决方案

it works fine, your browser is probably caching it for some reason.

Btw., ETags are not recommended in such situations, better just use an "Expires: " header ...

这篇关于为什么我的收藏夹图标不起作用?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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