Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 5 of 5
  1. #1
    Regular Coder
    Join Date
    Sep 2009
    Posts
    167
    Thanks
    15
    Thanked 1 Time in 1 Post

    "icon" vs. "shortcut icon" for favicon

    hello,

    should rel= be "icon" or "shortcut icon" for favicons?

    I have favicons working in Firefox, but not IE. I have it typed as "icon" right now. But it looks like IE might want "shortcut icon" instead.

    Does Firefox support "shortcut icon" for the favicon rel= description? Hopefully there is a description that will work for both Firefox and IE.

  • #2
    eak
    eak is offline
    Regular Coder eak's Avatar
    Join Date
    Jun 2002
    Location
    Nashville, TN
    Posts
    354
    Thanks
    0
    Thanked 26 Times in 26 Posts
    eak | "Doing a good deed is like wetting your pants; every one can see the results, but only you can feel the warmth."

  • #3
    The Apostate Apostropartheid's Avatar
    Join Date
    Oct 2007
    Posts
    3,215
    Thanks
    16
    Thanked 265 Times in 263 Posts
    The best way to link to a favicon is like this:

    Code:
    <link rel="shortcut icon" type="image/vnd.microsoft.icon" href="/favicon.ico"/>
    It's best to use the two word value to allow all clients to access it.

  • #4
    Regular Coder
    Join Date
    Apr 2010
    Posts
    118
    Thanks
    6
    Thanked 0 Times in 0 Posts
    There's nothing stopping you from using both. I have these on all my sites and my favicon shows up in all browsers:

    <link rel="shortcut icon" href="http://www.example.com/favicon.ico" type="image/vnd.microsoft.icon">
    <link rel="icon" type="image/png" href="http://www.example.com/images/favicon.png">

  • #5
    New to the CF scene
    Join Date
    May 2010
    Location
    Vancouver, BC, Canada
    Posts
    6
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Post

    I second instaunt's post. I would use both. Officially not all browsers support Microsoft's icon format (although most seem ok with it in the current generation of browsers).

    Plus for any browser that is ok with PNG you'll get better graphical output with true alpha channel support (semi-transparency).
    - Ben


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •