faqts : Computers : Programming : Languages : PHP : Common Problems : Errors

+ Search
Add Entry AlertManage Folder Edit Entry Add page to http://del.icio.us/
Did You Find This Entry Useful?

38 of 44 people (86%) answered Yes
Recently 7 of 10 people (70%) answered Yes

Entry

When does Internet Explorer try to retrieve favicon.ico?
Why do I get favicon.ico errors in my logs?

Jul 2nd, 1999 18:19
Nathan Wallace, Steven Champeon, Richard Davey


When an Internet Explorer user bookmarks your site their browser
automatically makes a request for favicon.ico.  If it exists then this
file is downloaded and placed as the icon next to your site in the users
bookmarks list.  IE4.x and 5.x have this "feature".

Note that the favicon.ico action is /not/ limited to the root directory
of a site - if the user bookmarks a page in a subdirectory, IE will try
to fetch the icon from that directory as well.  This may result in two
file not found errors in your log files.

If you want to reduce the number of errors or use a single favicon.ico
file for your whole site then you might like to use a redirect in
Apache:

RedirectMatch permanent .*/favicon\.ico$ http://foo.com/your/file.ico

This will sends all requests for favicon.ico to that location,
regardless of what subdirectory they are made in.

It should also be noted that Internet Explorer will download the file
regardless of size.  Don't name really large file favicon.ico!