Favicon can be used in two ways:
- Keeping the favicon.ico file in the server root directory
- favicon.ico using link attribute in the header of the HTML
- can be cached with the proper expiry header and can be served from CDN.
- E.g. <link rel="shortcut icon" href="http://in.yahoo.com/favicon.ico" type="image/x-icon" />
However there are something more to know about the second approach:
- IE loads favicon before lazy-loaded components.
- It increases the load on your application server.
- Favicon loaded with a <link> are loaded early in the FF waterfall