1

I have saved the favicon.ico in the root folder and added the following code to the head section of my home page. I've tried clearing my cache and also bookmarking the page then reloading it. The icon still does not display.

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

Any suggestions?

lanced
  • 11
  • 4

3 Answers3

0

Ensure you're serving it with the correct MIME type; see Paul Irish's comments.

The gist of it is that while some say that the standard MIME type is image/vnd.microsoft.icon, IE can only display it when its served with a MIME type of image/x-icon.

First, examine the headers (using Firebug, Chrome Inspector Tools, IE Developer Tools and whatever Safari uses.) for the HTTP request for favicon.ico. Check for MIME, and see what it says. If its wrong, add this to your .htaccess:

AddType image/x-icon ico
0

If MIME type isn't the problem, see this excellent answer by mercator; you don't actually have to add the <link> tag for it since Browsers automatically request /favicon.ico, unless you

  • Make it a .png,
  • Locate it somewhere other than the web root,
  • Or really, really want to name the icon as something other than favicon.ico.
Community
  • 1
  • 1
-1

It shoud be

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

you forget both /> close tags

Edited try this:

<link rel="shortcut icon" href="favicon.ico" type="image/x-icon"/>
sandino
  • 3,813
  • 1
  • 19
  • 24