这里是标题所使用的标题和链接,但我只得到了“文档”一词
<title>Chicken and Waffle | Local 360 | Gunyen</title>
<link rel="shortcut icon" type="image/png" href="images/gunyen%20logo%20dark.png">;
样本:https://gunyen.com/post/local360chknnwfl.php
我在做什么错?
再次检查您的代码!这是我在浏览器中看到的页面源代码:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Document</title>
</head>
<body>
</body>
</html>
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="docsearch:language" content="en">
<meta name="docsearch:version" content="4.3">
<meta content="width=device-width, initial-scale=1" name="viewport">
<link rel="shortcut icon" type="image/png" href="images/gunyen%20logo%20dark.png"/>
<!--https://developers.google.com/search/reference/robots_meta_tag#directives-->
<!--<meta name="robots" content="index, follow, archive">-->
<meta name="robots" content="nofollow, noindex">
...
您可以看到,有2个头块!
大多数浏览器都会从网站的根目录中提取favicon.ico,而无需告知;但是他们并不总是立即使用新的更新。
然而,以favicon.ico的名称完成任务的正确方法是:
<link rel='shortcut icon' type='image/x-icon' href='images/gunyen/logo/favicon.ico' />