I've followed instructions and done everything right (I think) to get my favicon to work, but it doesn't work on any browser.

I created my favicon.ico file (I used the PS plug-in). I put it in my root folder.

I put this in the head section of my HTML

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

I cleared caches, histories, icons as needed on both Safari and FF, and restarted both. browsers.

Still nothing.

Any ideas?

  • I think that you're pointing to the wrong place. And also, please try making "Shortcut Icon" all lower-case. Maybe that tag is case-sensitive. I doubt it, but maybe... Jason about 7 years ago

4 answers

0
points
This was chosen as the best answer

The reason it isn't working is because you aren't pointing to the right place. Either place the favicon in the root folder or change your code to look more like this:

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

I think that will do it.

Answered about 7 years ago by Abinadi Ayerdis
Jason 14
3
points

Ok, here's an easy way of associating a Favicon with your website. Create an ico file that is 16 pixels by 16 pixels (16px, 16px), make sure to save the ico file as "favicon.ico" only, and upload it to the root directory of the server that is hosting your website.

It's as simple as that.

I hope this has helped.

Answered about 7 years ago by Jason
  • I do the same and this has always worked for me. I never define the favicon in my HTML. Niels Bom about 7 years ago
2
points
 <!-- Adds the "favicon"-->
  <link rel="icon" 
  type="image/png" 
  href="http://example.com/myicon.png">

http://www.w3.org/2005/10/howto-favicon

I usually post-fix my searches with W3C and find that it can help quite a bit.

Hope that helps!

Answered about 7 years ago by Jim Holby
Doug 1095
1
point

First step would be to try to view just the icon in the browser. IOW, type http://example.com/favicon.ico into the address bar (change "example.com" to your domain). If it shows an icon, then the problem is in the webpage; if it doesn't, then the problem is with the icon file itself or the server.

(Note, though, that some webservers are not set up to send the correct MIME type with .ico files, so your browser may just show binary gibberish.)

Some other tips:

  • You only need one link, not two. Delete one of them.
  • The syntax I use is <link rel="shortcut icon" href="/favicon.ico" type="image/vnd.microsoft.icon" />
  • If your icon is located at "\favicon.ico", you don't need a link at all; all major browsers will automatically search there.
Answered about 7 years ago by Doug