html - Favicon 未显示在 Google Chrome 浏览器中

标签 html google-chrome favicon

出于某种原因,我的网站图标没有显示在我的 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 中的说明重置网站图标缓存

  1. 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/

相关文章:

html - rails form_for 样式

javascript - 为什么自动完成会删除文本框图像

javascript - Web 推送通知脚本适用于 Firefox 但不适用于 Chrome

javascript - jquery ui 可拖动 Accordion 在 Chrome 中粘贴到鼠标

macos - 全新安装后 Chrome 无法在 OSX 上启动

php - WordPress 菜单帖子特色图片

javascript - $_GET[id] 在 div id 中不起作用

javascript - 异步加载网页图标 - 跨浏览器解决方案?

reactjs - 在 React 中添加 favicon 到 <Helmet/>

objective-c - 从 WKWebView 获取 favicon.co