21

I would like to have information about the icons which are displayed alongside the site URLs on a web browser. Is this some browser specific feature? Where do we specify the icon source, ie, is it in some tag on the web page itself ?

Andrew
  • 12,991
  • 15
  • 55
  • 85
Nrj
  • 6,723
  • 7
  • 46
  • 58
  • See http://stackoverflow.com/questions/37073/what-is-currently-the-best-way-to-get-a-favicon-to-display-in-all-browsers-that – John Topley Sep 23 '08 at 11:33

9 Answers9

51

These icons are called favicons

Most web browsers support http://mysite.com/favicon.ico but the proper way to do it is to include an icon meta tag in the head profile.

<head profile="http://www.w3.org/2005/10/profile">
<link rel="icon" 
      type="image/png" 
      href="/somewhere/myicon.png" />
[…]
</head>

Source from the W3C itself.

Your best bet is to probably do both with the same icon image.

Brian R. Bondy
  • 339,232
  • 124
  • 596
  • 636
12

I believe you're referring to the Favicon, which allows a website to specify a 16x16 (or larger) image which is displayed in the address bar next to the URL in most modern browsers.

Some browsers just pick the file called favicon.ico which is in the root of your web folder, whereas others require it to be specified in the <head> of the HTML using the following code,

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

This was originally the way it was done with IE, but that doesn't conform to standards (because of the space in the rel), so most browsers now let you do it as follows, where you can use any standard image format, not just .ico

<link rel="icon" href="favicon.png" type="image/png" />
Rich Adams
  • 26,096
  • 4
  • 39
  • 62
2

It's called a favicon.

You might want to check out these three questions:

Community
  • 1
  • 1
Thomas Owens
  • 114,398
  • 98
  • 311
  • 431
0

These are favicons - more info on that page.

Basically, .ico files in the root directory on the webserver.

moonshadow
  • 86,889
  • 7
  • 82
  • 122
0

I will just add that some sites use an animated Gif as favicon. Which can be seen as über cool or supremely annoying, depending on your tastes... And probably not supported by all browsers.

PhiLho
  • 40,535
  • 6
  • 96
  • 134
0

This is called favicon you can look on this tutorial using favicon in asp.net application LINK

Hisham
  • 455
  • 4
  • 16
0

The easiest way to get that info is by this simple web app

link text

You only have to type the url of the page and it returns all the image properties

0

They're favicons. Browsers look at / on a server for favicon.ico

hydrapheetz
  • 3,540
  • 3
  • 17
  • 12
-3

It was originally a windows icon format file, stored under the URL http://site/favicon.ico. Most sites still use favicon.ico, and many browsers still automatically look there, regardless of the meta tags.

Chris
  • 4,852
  • 1
  • 22
  • 17
  • It has nothing to do with Windows. – Thomas Owens Sep 23 '08 at 11:33
  • 1
    Of course it does, the original favicon was implemented by Microsoft. The only backwards compatible format is the windows .ico format. Not only that, but some browsers ignore the meta tags and load the url anyways.. – Chris Sep 23 '08 at 11:38
  • 1
    It was originally an Internet Explorer feature, with the Windows icon format as the only supported format. – Jim Sep 23 '08 at 11:39