Last modified: 2011-08-31 03:32:22 UTC
The W3C recommends that icons be supported through the use of the following style of markup: <link rel="icon" type="image/png" href="http://example.com/myicon.png"> MediaWiki is using the old "shortcut icon" style which is compatible with IE, but with which it is not possible to specify a PNG file (IE will then refuse to display a favicon at all). It would be nice if MediaWiki had the option of supporting the new style, as IE will access /favicon.ico anyway if it does not see a "shortcut icon" link.
As it is currently implemented, using rel="shortcut icon", Firefox 3 does not recognize favicons set with $wgFavicon. A quick-and-dirty fix is the following: * Add a new line in includes/DefaultSettings.php: $wgFaviconType = 'image/vnd.microsoft.icon'; * Modify the line in includes/Skin.php that reads: $out->addLink( array( 'rel' => 'shortcut icon', 'href' => $wgFavicon ) ); to instead be $out->addLink( array( 'rel' => 'icon', 'type' => $wgFaviconType, 'href' => $wgFavicon ) ); In this case the user must specify $wgFaviconType as well as $wgFavicon in LocalSettings.php, e.g.: $wgFavicon = '/images/myIcon.gif' $wgFaviconType = 'image/gif'; Theoretically the type could be derived from the extension on the icon file itself, but that involves more code and also would break under the common case of the web designer renaming a non-ICO image (an animated GIF, for example) to have a .ico extension (see <http://en.wikipedia.org/wiki/Favicon#Legacy>).