为什么不使用404(未找到)错误加载favicon.ico时会失败? [英] Why am I seeing a 404 (Not Found) error failed to load favicon.ico when not using this?
问题描述
简介
为测试目的创建了简单的HTML模板后,没有favicon.ico,我在控制台中收到错误无法加载资源:服务器响应状态为404(未找到)" |" http://127.0.0.1:47021/favicon.ico ".
After creating a simple HTML template for testing purpose, with no favicon.ico, I receive an error in the console "Failed to load resource: the server responded with a status of 404 (Not Found)" | "http://127.0.0.1:47021/favicon.ico".
我正在尝试找出此错误的出处,并想知道是否有人有任何想法向我指出正确的方向.
I am trying to figure out where this error is coming from and wondered if someone had any ideas to point me in the right direction.
我的HTML页面如下:
<!doctype html>
<html>
<head>
<meta charset="UTF-8">
<title>Simple JavaScript Tester 01</title>
</head>
<body>
<script src="script.js"></script>
</body>
</html>
当我在Chrome浏览器中运行此页面并打开控制台时,看到错误消息无法加载资源:服务器响应状态为404(未找到)"." http://127.0.0.1:47021/favicon.ico ".我正在本地IIS服务器上运行它.每次创建新页面时,都会看到相同的错误消息.
When I run this page in Chrome browser and open the console, I see the error message "Failed to load resource: the server responded with a status of 404 (Not Found)" | "http://127.0.0.1:47021/favicon.ico". I am running this on a local IIS server. I see this same error message each time I create a new page.
此错误是否可能是由于我不知道的IIS服务器上的另一个页面引起的?
Is it possible this error is coming from another page on my IIS server that I am unaware of?
推荐答案
Google网站图标生成器并创建一个图标.将其命名为favicon.ico并将其放在您的webroot中.
Google favicon generator and make an icon. Name it favicon.ico and drop it in your webroot.
看看是否有帮助.
这里还有一个有关favicon的教程: https://www.w3.org/2005/10/howto-favicon
Also here is a tutorial on favicon: https://www.w3.org/2005/10/howto-favicon
这篇关于为什么不使用404(未找到)错误加载favicon.ico时会失败?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!