favicons

Soldato
Joined
12 Nov 2002
Posts
14,600
Location
In my own little world
How do favicons work ?

I've added this line (see bottom of post) into the <head> and put the favicon.ico in the images folder. I can browse to the file but it wouldn't display. This didn't start working for me until I added a forward for the domain to where the website existed on another domain. i.e. www.domain2.com forwarded to www.domain1.com/domain2/index.html. I've since removed the forward and the favicon still appears using www.domain1.com/domain2/index.html.

I've tried adding this code to another site using the same method except the website is hosted on the same domain without any forwards etc but doesn't work :(

What factors affect whether a favicon is displayed ?

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

MW
 
I think at its basic level it just needs this between the <head> tags -

Code:
<link rel="shortcut icon" href="favicon.ico" />

Then make sure it's in each page you want it to appear. Place the favicon in the root directory and ensure it's named "favicon.ico". The favicon needs to be 16px x 16px and consist of no more than 16 colors. This has always worked for me anyway.
 
Thanks :D

The 2nd site I'd dumped the favicon in the images folder :o

I was aware I needed it on all the pages, when I had the initial problem it wasn't working on any of them

It now seems to be working for all :D

MW
 
Back
Top Bottom