Question

<link rel='shortcut icon' href='img/favicon.ico'> 

The above line is inside head part of page. favicon.ico is inside img folder. Doesn't work in Firefox and Chrome.

I restarted browsers, cleared the cache many times...

Any suggestion.

I also tried:

<link rel="shortcut icon" type="image/x-icon" href="img/favicon.ico">
Was it helpful?

Solution

You forgot to self-close the link tag.

I think it is recommended to use double quotes as well:

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

If this doesn't work, have you tried to actually access the favicon image by typing the url like: http://example.org/img/favicon.ico to make sure it is reachable ?

OTHER TIPS

Try using:

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

without the "shortcut"

if that doesn't help, you might find something in this Wikipedia article on favicon

If any of the other answers don't work, just put ! in front of the tag.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top