local (file://) website favicon works in Firefox, not in Chrome or Safari- why?

后端 未结 7 1436
-上瘾入骨i
-上瘾入骨i 2020-11-27 18:15

The Question

When my website is local (using the file:// protocol), the favicon doesn\'t show up in Chrome or Safari, but it works in Firefox (all on a

7条回答
  •  情深已故
    2020-11-27 18:25

    Local file:// and chrome:

    For a local favicon in Chrome - according to an old thread found on linux command it should be possible to place a local favicon with the file:// if it's in the your /Downloads/ directory. So I tried it like this:

    
    
    
        Test
        
    
    
        

    Testing

    I don't have a apache or anything running. It's simply the way chrome can access local files using the file://. If I try using the favicon from another part of my filesystem it doesn't seems to work - so maybe that's a solution for chrome.

    enter image description here


    Local file:// and Safari:

    Still looking for a way - above code doesn't work for my up2date safari.


    Interesting topic's:

    • Security in depth loca web pages (Chromium Blog)

    General troubleshooting guide for your favicons:

    Have a look at: https://stackoverflow.com/a/16375622/1581725

提交回复
热议问题