Last modified: 2011-08-31 03:32:22 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T19980, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 17980 - Favicon should support W3C preferred method
Favicon should support W3C preferred method
Status: NEW
Product: MediaWiki
Classification: Unclassified
Parser (Other open bugs)
unspecified
All All
: Low enhancement with 1 vote (vote)
: ---
Assigned To: Nobody - You can work on this!
http://www.w3.org/2005/10/howto-favicon
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2009-03-14 19:29 UTC by Laurence 'GreenReaper' Parry
Modified: 2011-08-31 03:32 UTC (History)
2 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Laurence 'GreenReaper' Parry 2009-03-14 19:29:44 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.
Comment 1 Jadrian Miles 2009-04-07 20:46:13 UTC
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>).

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links