1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

[FavIcon] Important to be .ico format?

Discussion in 'HTML, Graphics & Programming' started by Conrad11, 26 May 2006.

  1. Conrad11

    Soldato

    Joined: 12 Jun 2005

    Posts: 5,362

    Hi there,

    I just wanted to know if it was important for fav icons to be in a .ico format because you can use a png and it seems to work in firefox?

    Is it important for it to be in .ico format? Does it have advantages?

    Thanks...
     
  2. Augmented

    Soldato

    Joined: 18 Oct 2002

    Posts: 5,464

    Location: London Town

    Wider support, and favicon.ico is what may applications will look for in the root by default when attempting to get your site's icon.
     
  3. Conrad11

    Soldato

    Joined: 12 Jun 2005

    Posts: 5,362

    Does that mean I do not have to link it in the head of the HTML....or should I still link it?
     
  4. Augmented

    Soldato

    Joined: 18 Oct 2002

    Posts: 5,464

    Location: London Town

    Yes, do link to it - that way you'll support both applications that automatically search for it, and those that look for a <link> in a page's <head> :).
     
  5. Conrad11

    Soldato

    Joined: 12 Jun 2005

    Posts: 5,362

    OK kool thanks :)
     
  6. Conrad11

    Soldato

    Joined: 12 Jun 2005

    Posts: 5,362

    Sorry to bring this up again, so that means it's best to put it in the root directory, yes?

    What do you mean by root directory, in the same folder as the index page?

    Thanks...
     
  7. Beansprout

    Man of Honour

    Joined: 31 Jan 2004

    Posts: 16,313

    Location: Plymouth

    http://[your domain]/favicon.ico :)

    If you don't put it there you'll be surprised how clogged your logs get with 404s, mainly from IE :eek:
     
  8. arty

    Soldato

    Joined: 18 Oct 2002

    Posts: 6,670

    Location: Cambridge

    Funnily enough I noticed this ages ago. It's very annoying if you don't actually want a favicon; does anyone know of a way to get round it somehow?

    arty
     
  9. Conrad11

    Soldato

    Joined: 12 Jun 2005

    Posts: 5,362

    Create a blank favicon?
     
  10. Beansprout

    Man of Honour

    Joined: 31 Jan 2004

    Posts: 16,313

    Location: Plymouth

    'touch favicon.ico'

    I create favicons and 404 pages by default since it's astounding just how much of the log files are crap.

    Look at this, and this is only 6 days:

    Code:
    grep favicon.ico /var/log/httpd/error_log | wc -l
      24101
    
    And for non-existant 404 pages:

    Code:
    grep '404.shtml' /var/log/httpd/error_log | wc -l
      66062
    Out of a total number of file not found errors:
    Code:
    grep 'File does not exist' /var/log/httpd/error_log | wc -l
     264625
    
    That's just insane - nearly 35% caused by no favicon/404 :eek:
     
  11. Moredhel

    Mobster

    Joined: 11 May 2004

    Posts: 4,786

    Location: Gloucester

    For widest support it's best to use two different link elements.

    <link rel="shortcut icon" href="/favicon.ico" type="image/x-icon" />
    <link rel="icon" href="/favicon.ico" type="image/x-icon" />

    Only one is the "standard" way of doing it, but browsers that implemented it before the standards were finalised use the other method.