HTML favicon won't show on google chrome

后端 未结 14 574
灰色年华
灰色年华 2020-11-27 16:28

I am making a HTML page that is unpublished . One of the things I wanted to do was add a favicon to appear next to the title. I\'m using google chrome and I noticed that oth

相关标签:
14条回答
  • 2020-11-27 17:11

    A common issue where the favicon will not show up when expected is cache, if your .htaccess for example reads: ExpiresByType image/x-icon "access plus 1 month"

    Then simply add a random value to your favicon reference: <link rel="shortcut icon" href="https://example.com/favicon.ico?r=31241" type="image/x-icon" />

    Works every time for me even with heavy caching.

    0 讨论(0)
  • 2020-11-27 17:14

    I've found that (at Chrome 56, OSX) the favicon state appears to be cached for the browser lifetime, so if a favicon isn't being loaded, it won't be until after restarting Chrome. It appears that it doesn't show up in the "application" tab in dev tools and isn't cleared by a hard reload or 'Clear site data'.

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