开发者

How to cache my favicon

Im trying to make my favicon cacheable as yslow suggets.

My favicon is http://www.tucoaster.com/favicon.ico

For some reason, the content type of the favicon is text/plain. I'm using apache2, and in my .htaccess i have

ExpiresByType text/plain "access plus 30 days"
ExpiresByType image/x-icon "access plus 30 days"
ExpiresByType image/ico开发者_JS百科 "access plus 30 days"

Note: Javascript and css headers are sent ok.

Any suggestion?


Apache may not know the right MIME type for the ICO format.

Try adding

AddType image/x-icon .ico

before the ExpiresByType directives.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜