Icon in address bar

Hi all;
im sure this has been asked a million times before, so im very sorry if i’m being dull, however…
ive spent the last hour trying to get a logo for my site in the address bar when my site is visited.
ive saved an icon in my root directory and also images folder and added the folowing code into the header tag
<link rel=“shortcut icon” href=“images/favicon.ico” type=“image/x-icon”/>

if it helps i can give the address to the website; wasnt sure if i was allowed to do that or not

thanks in advance

Your code seems fine. It might be a caching problem. Especially firefox can be a pain when it comes to showing favicons.
If you are using firefox try the following:

  1. Disable cache (for example using the Web Developer) add-on
  2. Empty the cache (use shift+del)
  3. Reload the page
  4. Close firefox (completely, i.e., all processes)
  5. Start firefox
  6. Go to your website
  7. Enable cache again

For me that always does the trick.

:tup: agreed with Scallio - I used to be driven crazy trying to get my favicon working only to find out it was a cache issue!

You can also try using a .gif/jpeg version of your favicon instead of the .ico :slight_smile:

Internet Explorer by default looks for the Favicon in the base directory, you could be having a problem as it’s being held outside of that location. It’s essentially like the robots.txt file, it should always be in the location that apps look for it (they’ll still make the request even if you link to it elsewhere). :slight_smile:

PS: Mizwizzy, that’s not a smart move, Internet Explorer does not allow (and will outright refuse to use) any format other than the browser-wide recognised (and standard) ICO format. GIF, JPEG and PNG images are only supported as Favicon’s by Firefox and Opera (Webkit has some issues with image formats too). :slight_smile:

Also you may want to bookmark the page to ensure it has a better chance of loading. Like was said if you have created a valid icon using the correct ICO format placed it in the root with the ‘favicon.ico’ name and cleared caches, and “browser history” it should display.

The current MIME for the favicon ICO is: "image/vnd.microsoft.icon" but “image/x-icon” is fine although not the official MIME.

The other more official (correct) way to "link" with regards to (x)html markup is as follows:

<link rel=“icon” href=“favicon.ico” type=“image/vnd.microsoft.icon” />

It’s worth pointing out that some browsers have an issue with the correct mime type. I always use “image/x-icon” because it has less caching issues and loading problems associated with it. A case in point would be Internet Explorer 6 which really takes issue with the mime type used. :slight_smile:

HI, The path you have given is absolutely perfect, but when run the application from your local desktop it will not show you the favicon in the addressbar, where the same you can find when it runs from the server, means -the icon will work when you run the application from the server not from the local – this is for IE. pls check in firefox browser it will accept from the local.

thanks
soorit

Hi 31caea8g,

The above info should be all you need, but there was an interesting thread on this not so long ago, in case you want a longer discussion. It includes info on creating a proper .ico file.