开发者

Is it necessary to keep favicon and apple icons at site root?

Is it necessary to keep favicon and apple icons at site 开发者_运维技巧root?

/favicon.ico
/apple-touch-icon.png

or it can be

/favicons/favicon.ico
/favicons/apple-touch-icon.png


You can put the icon file wherever you want and name it whatever you want.

But then you need to use a link tag to point to it:

<link rel="shortcut icon" href="/favicons/favicon.ico" />
<link rel="apple-touch-icon" href="/favicons/apple-touch-icon.png"/>

If it is named favicon.ico and is on the root, most browsers will pick it up automatically.

For the mobile apple platforms to pick it up automatically, it needs to be named apple-touch-icon.png and be placed in the root as well.


It can be where ever you want... By default, I believe browsers, or Safari at least, look in your root if you haven't' defined a location. But like I said, it can be where ever.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜