出于某种原因,我的网站图标没有显示在我的 chrome 选项卡上。从我读过的所有文章中,我都在正确地编写代码。它确实适用于 Firefox。我还清除了我的缓存并尝试了一个隐身窗口,但仍然没有看到它。
当我去: 本地主机:8080/favicon.ico 我确实看到了图标。
这是我在 HTML header 中的代码:
<link rel="shortcut icon" sizes="16x16 32x32 64x64"
href="/favicon.ico" type="image/x-icon" />
<link rel="icon" href="favicon.ico" type="image/x-icon" />
<link rel="apple-touch-icon" href="apple-touch-icon.png" />
任何帮助将不胜感激!谢谢!
最佳答案
尝试按照#3 here 中的说明重置网站图标缓存
- FAVICON CACHE RESET
A more drastic way to solve the problem, but that allows you to do it globally rather than site-by-site, is to clear the browser’s favicon cache. The procedure is:
on Mac: delete the following file
${user.home}/Library/Application Support/Google/Chrome/Default/Favicons
on Windows: delete Favicons-journal and Favicons files from the following location
C:\Users\nomeutente\AppData\Local\Google\Chrome\User Data\Default
In both cases, a browser restart is suggested.
关于html - Favicon 未显示在 Google Chrome 浏览器中,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/44664111/