开发者

Displaying a Favicon using recommended code is not working

I have "Googled" this quite a bit in the past hour.

I am working on a new website, and I've never used favicons before (I always forget about them). So, the first place I looked was Google, and the first result that came up was this one:

How To Add A Favicon To Your Site (W3.org)

And after trying out the first two options, and re-uploading the files to the server I have found that neither of the snippets of code on that page listed above work for me. I have double-checked that all references to the favicon are correct and that all files are in the right places. I have even tried using a .PNG file instead of an actual icon (.ico), which I have seen in use on other sites.

Then, I went back to Google and looked at a few more sites, and tried the code in those tutorials. It worked! Well, kind of... It worked in Flock web browser, FireFox, and Chrome. But it didn't work in Internet Explorer 9, 8, 7, or 6.

I then came over here to S/O, and "View Source"'d the homepage and used their favicon code and that still didn't work!

Here's the latest piece of code that I have now:

&开发者_Go百科lt;link rel="shortcut icon" href="http://mywebsite.com/favicon.ico">

What is the most reliable way of ensuring my Favicon displays in every browser?

Updates


  1. Tried Bookmarking the page - Didn't work.


Favicons are really annoying to recieve because they cache. Try using another computer and navigating to domain.com/favico.(png/ico)


Check the permissions to your .ico/.png file. I had the same problem once. So I went to http://my-url/my-favicon.ico and I got "Permission Denied" error.

I did chmod 644 to my-favicon.ico and it worked. :)


Here is code

<link rel="icon" type="image/x-icon" href="images/favicon.ico" />

For more detail about favicon please check

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜