简体   繁体   English

我的图标不会显示在 index.php 上,但会显示在 google chrome 的所有其他页面上。 在火狐中工作

[英]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.

相关问题 如何链接到我网站上除index.php之外的页面(其他所有页面均导致错误)? - How to link to page other than index.php on my website (all other pages result in error)? IIS 7.5域不会显示index.php - IIS 7.5 domain won't show index.php RSS不会在IE和chrome上显示,但在Firefox上能正常显示吗? - RSS won't show on IE and chrome but works fine on Firefox? 图片未在Chrome中显示。 它仅在Firefox中显示 - Image not showing in chrome. It shows only in firefox PHP 包括 header 菜单页脚适用于 index.php 但不适用于其他页面 - PHP include for header menu footer works on index.php but not other pages 如何将我的页面重定向到index.php? - How to redirect my pages to index.php? 行动版Chrome主萤幕网路应用程式无法开启index.php - Mobile Chrome home-screen webapp won't open index.php 删除index.php后,Codeigniter 3无法访问其他页面 - Codeigniter 3 can't reach other pages after removing index.php 如何通过PHP访问index.php内的其他页面? - How to get access of other pages inside of index.php by PHP? Laravel 5.1“ /”路由重定向到默认Apache页面。 /index.php和其他所有路由都可以正常工作 - Laravel 5.1 “/” Route redirects to Default Apache Page. /index.php and all other route works fine
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM