PDA

View Full Version : Favicon Code


iBob
02-21-2003, 10:54 PM
Ok, the favicon (little icon in the address bar). I've tried and tried again, and it still won't work. I've read through everything i've found on it, even the official homepage http://www.favicon.com So i've seen a few sites, including this one in the FIRST community and was hoping some of you fellow FIRST team webmasters could tell me what i'm doing wrong. I've made a 16x16 .ico file, saved to my main directory, added the little snippet of code and still don't see it. Does your server have to have special code or something installed? I hope someone can help, thanks in advance.

Visit Team 240's Homepage (http://www.jefferson.k12.mi.us/jhs/robotics)

gliebowitz
02-21-2003, 11:42 PM
There shouldn't be any scripting or server configuration required.

Did you save it as "favicon.ico"?

Ameya
02-21-2003, 11:56 PM
You need to have the following code in your html file:

<LINK REL="SHORTCUT ICON" HREF="http://***put path here***">

That tells the browser that there exists a favicon for your site, and where it is located.

Trashed20
02-21-2003, 11:58 PM
I think only ie 5+ supports this. what browser are you using? Also, try clearing your cashe and reloading the page.

Brandon Martus
02-22-2003, 12:58 AM
Originally posted by Ameya
You need to have the following code in your html file:

<LINK REL="SHORTCUT ICON" HREF="http://***put path here***">

That tells the browser that there exists a favicon for your site, and where it is located.

I thought IE just automatically searched for this file in your websites root directory. I guess that tag will force it, if it doesn't.

rbayer
02-22-2003, 01:20 AM
IE definately does it automatically, as my server logs show many, many, many failed requests for /favicon.ico even though I don't have any tags relating to favicons anywhere.

As previously mentioned, are you sure it's saved in the root directory as favicon.ico and that you're using IE? Also, is it an actual ico file or just a bmp renamed to an ico? Finally, you do probably need the <link rel=... tag as your root directory isn't the actual root directory (ie you are a subfolder of your school's site).

jonathan lall
02-22-2003, 01:49 AM
I believe IE looks for <siteroot>/favicon.ico and shows the icon in Favorites. It needs the link rel way to display it on the Address Bar, but only supports .ico.

Mozilla can be selected through UI Preferences to show website icons (link rels, any file format) in the Address Bar (enabled by default in Netscape), and through hidden prefs to show website icons that IE shows only in Favorites (i.e. the <siteroot>/favicon.ico file). Opera is showing the <siteroot>/favicon.ico file in the Address Bar as I go to team188.com (http://www.team188.com/), so it looks like it has similar behaviour to Mozilla.

iBob
02-22-2003, 09:34 AM
Thank you! I figured it out, I had to give it the direct url, not just a /favicon.ico or anything. And just to let everyone know, almost every browser supports the new favicons. I'm using Safari (Apple) and on occasion I use Chimera (a mozilla build). Both of these supports it as well as most other broswers i've used (not including IE for Mac). But anyways, thanks for all of your help!