Setting up Favicons in IE8, Firefox, Safari, and Opera

Firefox(+Camino), Safari, and Opera:

These browsers are easy to setup and only require a 16×16 image file (png, jpg, or gif) and a link tag in the head tag of your code.

[cc lang="html"]

IE automaticaly checks the root directory for a file called favicon.ico, so thats where I recommend placing your image. (/favicon.ico)

You don’t need any link code snippet to make this work, but if you wanted to force IE to find it and or change it for another page you can use the following link code in the head tag.

[cc lang="html"]

I wrap this code with an IE conditional comment. Although the other browsers recognize this code, it’s not correct if your trying to produce accurate XHTML, because of the space in “shortcut icon”.

[cc lang="html"]


3 Responses Post a comment
  1. OneDou

    好吧,我翻译一下,转走了。。 :oops:

  2. zrqx008


Leave a Reply

Note: You may use basic HTML in your comments. Your email address will not be published.

Subscribe to this comment feed via RSS