SitePoint Sponsor

User Tag List

Results 1 to 5 of 5
  1. #1
    SitePoint Enthusiast
    Join Date
    Nov 2009
    Posts
    70
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Favicon in the <head>

    SitePoint Members,
    I took <link rel="shortcut icon" href="/favicon.ico" /> out of the <head> and Firefox and IE still show the favicon in the address bar. Should I put
    <link rel="shortcut icon" href="/favicon.ico" /> back in?


    Linda

  2. #2
    Programming Team silver trophybronze trophy
    Mittineague's Avatar
    Join Date
    Jul 2005
    Location
    West Springfield, Massachusetts
    Posts
    17,170
    Mentioned
    190 Post(s)
    Tagged
    2 Thread(s)
    AFAIK, some (most?) browsers automatically look for a file named "favicon.ico" in the root folder to use in the address bar and in favorites. But if you want it to show in the most browsers possible, I'd leave the link tag in the head.

  3. #3
    Programming Since 1978 silver trophybronze trophy felgall's Avatar
    Join Date
    Sep 2005
    Location
    Sydney, NSW, Australia
    Posts
    16,815
    Mentioned
    25 Post(s)
    Tagged
    1 Thread(s)
    You only need the HTML tag if the icon is either in a different folder from the HTML or has a filename other than favicon.ico
    Stephen J Chapman

    javascriptexample.net, Book Reviews, follow me on Twitter
    HTML Help, CSS Help, JavaScript Help, PHP/mySQL Help, blog
    <input name="html5" type="text" required pattern="^$">

  4. #4
    SitePoint Enthusiast
    Join Date
    Nov 2009
    Posts
    70
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Steve, Mitt,
    Thanks for the help. You know I noticed that the favicon graphic shows up on my desktop when I drag the address of the site from the browser to the desk top. Is that from removing that line? If so, I'm not sure if it's good or bad or neither.

    Linda

  5. #5
    Follow: @AlexDawsonUK silver trophybronze trophy AlexDawson's Avatar
    Join Date
    Feb 2009
    Location
    England, UK
    Posts
    8,111
    Mentioned
    0 Post(s)
    Tagged
    1 Thread(s)
    You should keep the reference in (purely out of convention) because not all browsers violate the HTTP standard by automatically trying to find the icon (as I said in another post), if you want the favicon to work (for example) in Chrome, Safari or Opera you will need to reference it because as far as I am aware only IE defaults to this behaviour (Firefox is probably just using the cached icon), it's a matter of being as cross compatible as possible.


Bookmarks

Posting Permissions

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