Favicon

Design

First use a icon editor [1] or an online favicon generator [2] to design a suitable icon for the website. Easiest is to scale down a logo, a header section or a front image to the size 16x16 pixel and change it slightly if necessary.

File

Put the designed icon with the name favicon.ico in the root directory of the web application. The graphic must be created in the icon format, just renaming the extension of known image formats [3] to the extension ico is not enough!

Integration

Integerate the following Tag in the head area of the HTML page, so that the favicon will be displayed in all browser as possible.

<link href="/favicon.ico" rel="shortcut icon" type"image/vnd.microsoft.icon" />

Webserver

It happens in some server programs, like GlassFish, that the favicon will not be shown in spite of right file location and correct format.

The cause of this is a missing mapping of the MIME Type image/vnd.microsoft.icon for the file extension ico. Therefore the webserver sends the favicon with wrong type information text/html to the browser and there its displayed wrong.

Resources

Johannes Hammoud Favicon 30.08.2009

I Coding : Community about Java programing

Language German+-

Java JSF JavaScript HTML CSS NetBeans GlassFish MySQL

Imprint

Visits
6279866
Today
7188