[英]My favicon won't show on index.php but shows on all other pages in google chrome. Works in firefox
All my php pages sit in the one folder (public_html) on my hosted production linux server.我所有的 php 页面都位于我托管的生产 linux 服务器上的一个文件夹 (public_html) 中。 Inside that folder I have an images folder with my icon in it.
在该文件夹中,我有一个带有我的图标的图像文件夹。 All pages aside from index.php show the favicon.
除了 index.php 之外的所有页面都显示了 favicon。 They all have this tag in their head:
他们脑子里都有这个标签:
<link rel="icon" type="image/png" href="./images/t2.png">
Any idea why it won't show on index.php in google Chrome?知道为什么它不会显示在谷歌浏览器的 index.php 上吗?
edit: The solution in the "possible duplicate" doesn't fix my problem.编辑:“可能重复”中的解决方案不能解决我的问题。
Chrome has a pretty "sticky" favicon cache, does it help to delete saved files/images in your Chrome settings and reload the page? Chrome 有一个非常“粘性”的图标缓存,它有助于删除 Chrome 设置中保存的文件/图像并重新加载页面吗? You could try with ctrl+F5 (Win) or cmd+shift+R (Mac) first.
您可以先尝试 ctrl+F5 (Win) 或 cmd+shift+R (Mac)。 More info: https://www.nullalo.com/en/how-to-delete-google-chrome-favicon-cache/
更多信息: https : //www.nullalo.com/en/how-to-delete-google-chrome-favicon-cache/
Solved this by renaming my icon image to favicon.ico
and putting it in the root directory.通过将我的图标图像重命名为
favicon.ico
并将其放在根目录中来解决此问题。 Didn't change the icon reference in the html head.没有更改 html 头中的图标引用。 That reference must be ignored by Chrome on index.php, but followed on other pages, for some reason.
Chrome 在 index.php 上必须忽略该引用,但出于某种原因在其他页面上遵循该引用。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.