0

I opened Chrome's developers tools and it doesn't load my favicon at all when I looked for it at networks tab. Here is my code:

<DOCTYPE HTML>
<head>
    <link rel="icon" href='./img/favicon.ico' type="image/x-icon"/>
    <meta charset="utf-8">
    <title>Website</title>
    <link rel="stylesheet" href="style.css">
    <script src="https://ajax.googleapis.com/ajax/libs/jquery/2.2.0/jquery.min.js"></script>
    <script src="script.js"></script>
</head>
Ro Yo Mi
  • 14,790
  • 5
  • 35
  • 43

4 Answers4

2

Try this one:

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

Ronak
  • 127
  • 3
  • 15
1

Upload your favicon.ico to the root directory of your website and that should work with Chrome. Some browsers disregard the meta tag and just use /favicon.ico

Go figure?.....

Naresh Kumar
  • 561
  • 2
  • 15
0

Try adding type type="image/x-icon"

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

and try move the favicon.ico in an subdir /img

then

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

or with shortcut icon

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

or save the ico like a png

 <link rel="shortcut icon" type="image/png" href="./img/favicon.png" />
ScaisEdge
  • 131,976
  • 10
  • 91
  • 107
0

Seems there's no issue with your code attributes.This is the standerd form

<link rel="icon" href="imagelocation" type="image/x-icon" sizes="16x16">

Try a Image from internet without downloading and make verify that it's not a issue of Chrome first.Then take a look to your code and location of the image are matching correctly with your location of file you have call your Favicon.

Accroding to your tag your favicon should be in a sub directory called 'img'.This may be a browser cacheing issue also. Try viewing page source (Right Click > View Page Source ) and go to the location of the image and try reload it.

Srivin Prabhash
  • 123
  • 1
  • 4
  • I have tried an online favicon and it didnt do anything, i have tried reloading with ctrl+shift+r to ignore the cache and still nothing, tried in other pcs and again the same result – Davimar Caffe May 01 '16 at 14:49
  • remove that ./ part and try again.. href="img/favicon.ico" .. and try adding your favi to root directory. If its already in the root directory why you using that /img part in your tag ? – Srivin Prabhash May 01 '16 at 14:51
  • moved it back and forth its not doing the trick, removed the ./ still nothing – Davimar Caffe May 01 '16 at 14:57