Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What ways can I put a FAVICON into my site?

I was looking around the web at the way different sites put their favicon into the site. Whenever I try to do it myself I end up "hacking" until it just suddenly decides to work.

I suppose I have 2 questions in one here.

  1. How is this site adding it's favicon? - http://www.fbd.ie

    I can't find favicon.ico in it's page source.

  2. Apart from including <link rel="shortcut icon" href="/favicon.ico">, how can I include a favicon?

like image 954
Denis Hoctor Avatar asked Dec 13 '22 03:12

Denis Hoctor


1 Answers

The easiest way to add a favicon is to simply put a file named favicon.ico into the root directory of your web site.

Browsers will find it automatically.

You can also specifically put in a <link> tag. Any of these will work:

<link rel="icon" type="image/vnd.microsoft.icon" href="http://example.com/image.ico">
<link rel="icon" type="image/png" href="http://example.com/image.png">
<link rel="icon" type="image/gif" href="http://example.com/image.gif">

Edit: I see you knew that already. :D

like image 89
zombat Avatar answered Dec 22 '22 00:12

zombat