SitePoint Sponsor

User Tag List

Results 1 to 12 of 12

Thread: Favicon

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

    Favicon

    SitePoint members,
    I changed the file name of my favicon.ico file to aaf.ico. and changed the reference to this file in the <head> accordingy. It works fine, but one speed test showed time being spent on redirection. Is that a coincidence and the redirect was cause by something else, or should favicon.icon be named favicon.ico?

    Thanks,

    Linda

  2. #2
    Resident curmudgeon bronze trophy gary.turner's Avatar
    Join Date
    Jan 2009
    Location
    Dallas
    Posts
    990
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    The favicon really should be named favicon.ico (and be a real ico format image), and it should live in the document root directory. If that is done, everything will work automagically.

    cheers,

    gary
    Anyone can build a usable website. It takes a graphic
    designer to make it slow, confusing, and painful to use.

    Simple minded html & css demos and tutorials

  3. #3
    SitePoint Member
    Join Date
    Dec 2009
    Posts
    5
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    there is not need to change name of favicon.ico

  4. #4
    SitePoint Enthusiast
    Join Date
    Nov 2009
    Posts
    70
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Gary,
    Why should favicon.ico be named favicon.ico. Is there an actual reason?

    Linda

  5. #5
    Robert Wellock silver trophybronze trophy xhtmlcoder's Avatar
    Join Date
    Apr 2002
    Location
    A Maze of Twisty Little Passages
    Posts
    6,316
    Mentioned
    60 Post(s)
    Tagged
    0 Thread(s)
    The reason is many browsers will request a file called; 'favicon.ico' and usually expect there to be one - mainly due to legacy. Just like most Search Engine crawlers look for a; robots.txt

  6. #6
    Resident curmudgeon bronze trophy gary.turner's Avatar
    Join Date
    Jan 2009
    Location
    Dallas
    Posts
    990
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    As xhtmlcoder said, it's just one of those things that graphic browsers do; they look in the doc root directory for favicon.ico. Also, the reason it should be a real ico file is that IE (maybe 8 does better; I haven't checked) doesn't handle other formats masquerading as an ico. Firefox, and others, read the image's meta data, the 'magic number' that each image file has. It's not a Good Thing to mis-label the format, anyway.

    cheers,

    gary
    Anyone can build a usable website. It takes a graphic
    designer to make it slow, confusing, and painful to use.

    Simple minded html & css demos and tutorials

  7. #7
    SitePoint Enthusiast
    Join Date
    Nov 2009
    Posts
    70
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    X.C., G. T.,

    Case in point, IE7 doesn't show the icon I want in the address bar. I didn't realize that. Guess I'm spoiled by Firefox. Thanks a bunch for the help.

    If you're wondering why I wanted to change the filename, I pushed all the main graphic files (bacground, style.css, header graphic on all pages, dodad graphics on all pages, to the top of the root and it's sped up my site.


    Linda

  8. #8
    SitePoint Enthusiast
    Join Date
    Nov 2009
    Posts
    70
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    That's not quite right I figured out.

    I used http://tools.dynamicdrive.com/favicon/ to create a favicon, put the 16x16 favicon in the root, try to bring up the favicon.ico by exact address, comes up fine in Firefox but not IE. Any idea why? Is it that IE won't take 16x16 favicons?

    Thanks,

    Linda

  9. #9
    SitePoint Member
    Join Date
    Dec 2009
    Posts
    17
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    for one instance , when you add a bookmark to firefox it pulls the favicon.ico

  10. #10
    Resident curmudgeon bronze trophy gary.turner's Avatar
    Join Date
    Jan 2009
    Location
    Dallas
    Posts
    990
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Well, Linda, since you haven't given us a link so we could inspect the issue, it's a guess at best. Some versions of IE show the favicon in the address bar only if it's been added to your bookmarks (favorites), and some not even then. That was the original purpose, to dress up your bookmarks, not the address bar.

    Just make sure you have the favicon.ico in the doc root, and don't bother to mention it in your pages. That pretty much guarantees it will work to the best of each browser's ability.

    cheers,

    gary
    Anyone can build a usable website. It takes a graphic
    designer to make it slow, confusing, and painful to use.

    Simple minded html & css demos and tutorials

  11. #11
    SitePoint Enthusiast
    Join Date
    Nov 2009
    Posts
    70
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Why waiting overnight fixed the favicon not showing in IE is beyond me. I cleared the cache, closed all browsers, restarted the computer and still couldn't get IE to show the favicon last night, even when using the direct address. Today, without any effort, the favicon displays just fine.


    On providing the address of my site: If anyone knows of a way to display the address so google won't find it, please let me know. The site has nothig to do with programming, so when google finds it on programming sites, it advesely affects my ranking. Here's the site http://www.8a8c8t8u8a8L8c8u8r8e8s.com/ BE sure to take out the 8s.

    Linda

  12. #12
    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)
    Quote Originally Posted by Lindaro View Post
    Why should favicon.ico be named favicon.ico. Is there an actual reason?
    Sorry for the late reply (than I wanted) but (in clarification) the main reason is because of Internet Explorer, it's the only default browser which looks by default for the favicon without asking permission or reference in the HTML (in the same way search engines look for the robots.txt file), because they "reserve" the name by hijacking the path as a request (against the W3C recommendations) it's become a situation that if you don't have the favicon in the root path IE will request for it in the root path and then request it again from it's actual location! IE also has a bug with the caching of favicon's and their relevant pages. This is why your icon didn't appear at first but magically made itself known out of the blue, no-one really knows why it occurs to be honest.


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
  •