Favicon not showing up

前端 未结 11 2440
忘掉有多难
忘掉有多难 2020-12-05 04:40

I placed my favicon here:

http://www.vittoriosastarsnursery.com/favicon.ico

But for some reason it doesn\'t want to show in Firefox. It did work in IE, but I

相关标签:
11条回答
  • 2020-12-05 05:01

    For those who have tried everything and the favicon still does not show up:

    1. Put it in your sites Root Directory
    2. Rename it "favicon.ico"
    3. Make sure your code is like such:

      <link rel="icon" href="favicon.ico"/>
      

      1. IF you still have the same problem, put the whole website in ANOTHER DIRECTORY, like a Memory Stick (that fixed it for me :) ).

      2. REMEMBER: You HAVE to put the icon code in the of EVERY page. :)

    0 讨论(0)
  • 2020-12-05 05:04

    If you don't want to spend hours. trying to figure out why your favicon is not showing up, make sure to always place it in the root of your project folder and add a link in the <head></head> section of your page like so:

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

    Folder Structure

    --app
    -----img
    -----js
    -----css
    -----favicon.ico
    
    0 讨论(0)
  • 2020-12-05 05:08

    I can see it in Chrome, Firefox, and IE. My friend had a problem like this when we were testing back in college. It was just a weird caching thing that made her think it wasn't working right. I'm sure that everyone besides you will be able to see that it works fine. You could always try restarting your browser after clearing the cache and see if that helps.

    0 讨论(0)
  • 2020-12-05 05:08

    I had this problem too. it turns out (for me at least) that blocking users / agents with no referrer via .htaccess caused the problem.

    0 讨论(0)
  • 2020-12-05 05:12

    Two things to consider

    • If it's working in some browsers and not in others it's likely going to be a cache issue. Clear your cache and refresh, or for more in depth info: How do I force a favicon refresh
    • If favicon.ico is in the project's root folder but not being recognized by any browsers I would check out the .htaccess, or whatever equivalent of .htaccess depending on server type etc.
    0 讨论(0)
  • 2020-12-05 05:13

    https://github.com/ritwickdey/vscode-live-server/issues/77

    I was facing this problem with VS-Code live server, as discussed above it's browser cache issue, there is popular github thread on this.

    just try the trick:

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

    Happy learning

    0 讨论(0)
提交回复
热议问题