Cannot get Favicon.ico to display

前端 未结 8 2146
死守一世寂寞
死守一世寂寞 2021-01-02 08:55

I have copied my favicon.ico file to my Apache document root. I had to add an Apache Rewrite exception for it and now it is accessible from www.example.com/favicon.ico. Bu

相关标签:
8条回答
  • 2021-01-02 09:01

    favicon icon behaves differently for different browswrs & sometimes if it works in FF & does not work in IE. Try after Clearing the cache of the browser and standard code for favicon ico is, Just put below tag in your index file OR whichever common file for your project.

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

    Although new browsers support GIF and PNG images , but , I would suggest always saving the image as favicon.ico.

    0 讨论(0)
  • 2021-01-02 09:02

    IE and Firefox can behave differently (not sure which one you are using). Try to add the page as a bookmark, then click the bookmark (to load the page). After you do that exit your browser and see if the if shows up then.

    If that does not work try to clear your browser cache and repeat the above steps that should fix it. I have seen your problem before!

    0 讨论(0)
  • 2021-01-02 09:03

    Could it be that you uploaded the favicon after your browser has remembered that your domain doesn't have one and therefore doesn't issue a new request?

    0 讨论(0)
  • 2021-01-02 09:03

    It seems like in Chrome that you cannot use a link (ex. https://) rather must you have the favicon.ico in the same folder as the index.html. For any other file, it seems to work with a link.

    0 讨论(0)
  • 2021-01-02 09:08

    Try placing the ico file in an images folder in your root. That's where many browsers look for favicon. And that's something to keep in mind. Favicon is a very loose standard, if you can even call it that, which is supported by browsers, not by the server. The browsers themselves actually fetch favicons in separate calls to display on their favorites bars, or tabs... The favicon file just has to be placed somewhere that the browsers can find it.

    0 讨论(0)
  • 2021-01-02 09:08

    Some browsers will pick up the icon if its in the root directory without adding anything to the page, however IE and FF don't. Add this code to the head section of your page

    <link rel="shortcut icon" type="image/x-icon" href="/favicon.ico">
    
    0 讨论(0)
提交回复
热议问题