I have a few static pages that are just pure HTML, that we display when the server goes down.
(我有几个静态页面只是纯HTML,我们在服务器出现故障时显示。)
How can I put a favicon that I made (it's 16x16px and it's sitting in the same directory as the HTML file; it's called favicon.ico) as the "tab" icon as it were?(我如何将我制作的图标(它是16x16px并且它与HTML文件位于同一目录中;它称为favicon.ico)作为“标签”图标?)
I have read up on Wikipedia and looked at a few tutorials and have implemented the following:(我已经阅读了维基百科并查看了一些教程并实现了以下内容:)
<link rel="icon" href="favicon.ico" type="image/x-icon"/>
<link rel="shortcut icon" href="favicon.ico" type="image/x-icon"/>
But it still doesn't want to work.
(但它仍然不想工作。)
I am using Chrome to test the sites.(我正在使用Chrome来测试这些网站。)
According to Wikipedia .ico is the best picture format that runs on all browser types.(根据维基百科.ico是所有浏览器类型上运行的最佳图片格式。)
Update (更新)
I could not get this to work locally although the code checks out it will only really work properly once the server started serving the site.
(虽然代码检查它只能在服务器开始为站点提供服务后才能正常工作,但我无法让它在本地工作。)
Just try pushing it up to the server and refresh your cache and it should work fine.(只需尝试将其推送到服务器并刷新缓存,它应该可以正常工作。)
ask by TheLegend translate from so