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 4 of 4
  1. #1
    Regular Coder
    Join Date
    May 2008
    Location
    Michigan
    Posts
    216
    Thanks
    10
    Thanked 1 Time in 1 Post

    Favicon not displaying

    I cannot get my favicon to display and it is driving me up the wall!

    Code:
    <link rel="icon" href="http://www.iwanttobeanowner.com/favicon.ico" type="image/vnd.microsoft.icon"/>
    Originally I had the rel set to shortcut icon.

    Can any one help me please?

  • #2
    Master Coder
    Join Date
    Apr 2003
    Location
    in my house
    Posts
    5,211
    Thanks
    39
    Thanked 201 Times in 197 Posts
    <link rel="shortcut icon" href="http://www.example.com/images/favicon.ico" />

    depends on your browser...some require the url to be in your favourites/bookmarks.

    bazz
    "The day you stop learning is the day you become obsolete"! - my late Dad.

    Why do some people say "I don't know for sure"? If they don't know for sure then, they don't know!
    Useful MySQL resource
    Useful MySQL link

  • #3
    Senior Coder Arbitrator's Avatar
    Join Date
    Mar 2006
    Location
    Splendora, Texas, United States of America
    Posts
    3,316
    Thanks
    29
    Thanked 280 Times in 274 Posts
    Quote Originally Posted by nicky View Post
    I cannot get my favicon to display and it is driving me up the wall!

    Code:
    <link rel="icon" href="http://www.iwanttobeanowner.com/favicon.ico" type="image/vnd.microsoft.icon"/>
    Originally I had the rel set to shortcut icon.

    Can any one help me please?
    shortcut icon is the "keyword" required by Internet Explorer. Other browsers only recognize the keyword icon since, per the HTML 4.01 spec, keywords cannot have spaces in them (and, thus, Internet Explorer has a bug). shortcut icon ends up working in those other browsers anyway since they recognize that keyword as actually being two separate keywords and one of them happens to be the one they recognize (i.e., icon).

    As for your issue, based on the above, that code will not produce a favicon in Internet Explorer. Additionally, make sure that the icon file is at the referenced location and is actually in the Microsoft Icon format. (Renaming a GIF or PNG won't work.)

    Furthermore, if the document is local, the favicon won't display in any browser, including Firefox, IIRC. You need to upload it to a server for the browser to recognize it. (Or you can trick the browser by using your own computer as a server with something like XAMPP.)

    IIRC, IE has some other limitations, but I forgot what they were; I think it was something like they only display if the page is on your favorites list. I haven't checked that in IE since IE6 though.
    For every complex problem, there is an answer that is clear, simple, and wrong.

  • #4
    New Coder
    Join Date
    Aug 2010
    Location
    Hamilton, New Zealand
    Posts
    88
    Thanks
    5
    Thanked 4 Times in 4 Posts
    If the favicon is in the same folder on your site as the html page, then get rid of "http://www.iwanttobeanowner.com/favicon.ico" and just cut it down to "favicon.ico" or "/favicon.ico" if it is in your root folder. Also, if your wanting the same favicon across all your pages, just put the favicon.ico file in the root folder and it will automatically show up in your browser.

    Hope this helps


  •  

    Posting Permissions

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