<DOCTYPE! HTML>
<html>
<head>
<title>Login</title>
<link rel="icon" href="favicon.ico" type="image/x-icon">
</head>
<body>
some text
</body>
</html>
这是我为在浏览器的新标签栏中添加图像而编写的代码。但这是行不通的。我也在使用 wamp 服务器,如果 wamp 可能会导致问题。
原文由 pro_2911 发布,翻译遵循 CC BY-SA 4.0 许可协议
根据 wikipedia ,与浏览器最兼容的咒语是:
之后,您只需要担心您的浏览器是否真的在下载图标。服务器日志说什么?你检查过你的浏览器网络调试控制台吗?