Question

I'm loading my favorite icon like this:

  <link rel="icon" type="image/ico" href="images/logoico.ico">

And I'm using fullpage.js. So when I click a button to go to a different section my url changes from this:

file://localhost/Users/mauriciosanchezduque/Documents/codeMath/index.html

to this:

file://localhost/Users/mauriciosanchezduque/Documents/codeMath/index.html#secondPage

and the favicon disappears. Any idea?

Était-ce utile?

La solution

Well... according to the link you provided. When I view the source, I see

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

but your favicon is located here: http://54.235.78.67/codeMath/images/logo.ico

Here your path is wrong and the filename Is also wrong. Try using this:

<link rel="icon" type="image/ico" href="images/logo.ico">

Autres conseils

I assume your favicon is in dir

file://localhost/Users/mauriciosanchezduque/Documents/codeMath/images

Just change href of icon to

file://localhost/Users/mauriciosanchezduque/Documents/codeMath/images/logoico.ico

I will suggest you to keep this name favicon.ico and to place it in the root. Also put these line in the head:

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

Or

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

And the file favicon.ico must be 16x16 bits.

Note that the file must be in the root. But if your file has the favicon.ico you can even not write those lines above in your code

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top