4

I have a favicon on my page, and when i go to the link for the favicon: mypage/favicon.ico It starts download, instead of just showing it as an online image (as every other site).

I've searched everywhere for a solution, but got no answer.

I want it to show, and not to be downloaded, what can be the problem?

<head>
<link rel="shortcut icon" href="/favicon.ico">
</head>
  • Its an .ico file at 32x32.

Thanks - Chris

Christian
  • 63
  • 8

2 Answers2

0

You can show it in HTML as a regular image tag. This has been tested in Firefox 26, Chrome 29 and Internet Explorer 10. All with positive results. You can try on your own browsers if you'd like. Code:

<!DOCTYPE html>
<html>
<body>
<img src = "logo.ico" type = "image/x-icon">
</body>
</html>
-1

You should use

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

And consider to use another image e.g .png

 <link rel="icon" href="/favicon.png" type="image/png" />

(Some Browsers does not support .ico)

If you call mypage/favicon.ico directly it might be dowloaded, depending on your http server/browser which mime type should be downloaded or displayed. see Wikipedia.

Eun
  • 4,146
  • 5
  • 30
  • 51
  • [Wikipedia](http://en.wikipedia.org/wiki/Favicon#Browser_implementation) says that .ico is the best format and the way the is written fits nice aswell. For every browser. – Christian Feb 27 '13 at 10:38