MarieClare
MarieClare

Reputation: 185

Do most browsers automatically search for the favicon.ico?

I would like to know if it is necessary for me to specify it like this:

<link rel="icon" href="[URL]" type="image/x-icon" />
<link rel="shortcut icon" href="[URL]" type="image/x-icon" />

or can I just include it in the root and the browser will look for it? Also what's the difference between rel="icon" and rel="shortcut" ?

Upvotes: 14

Views: 8081

Answers (3)

I have observed this same thing in my firefox-nightly browser at call as simple as localhost:3000 with no internet connection. However, in Chrome it is not the case. Maybe it's because of some extension.

Upvotes: 0

Delan Azabani
Delan Azabani

Reputation: 81384

All of the major five browsers look in the site's root for a file named exactly favicon.ico, regardless of type, automatically.

You can override this with a link element with rel="icon", or rel="shortcut icon". The latter is supported by every browser, while the former is more correct, but not recognised by Internet Explorer.

Upvotes: 28

Oded
Oded

Reputation: 499002

Most browsers these days will look for a favicon.ico file on the root of the site.

Upvotes: 1

Related Questions