Failed to load resource: the server responded with a status of 404 (Not Found) favicon.ico文件找不到
今天使用sublime以localhost方式打开html文件时(使用wamp环境提供一个Apache服务器,html文件存在于wamp环境的www文件夹下),出现favicon.ico文件找不到问题
查看D:\wamp\logs文件夹的apache_error.log文件发现以下错误信息:
[Thu May 11 16:40:06 2017] [error] [client ::1] File does not exist: D:/wamp/www/favicon.ico, referer: http://localhost/js/test.html
仔细对照路径查看确实没有favicon.ico文件,后来查了相关的资料才知道,这是浏览器自动加载的,浏览器一般自动在网站根目录寻找,就是你页面卡片那个图标。
favicon.ico意指你的网站图标。 当有人(使用IE浏览器)将你的网站收藏为“my favorite”时,就会去参照网站根目录下的“favicon.ico”文件,这个图标也就是“my favorite”里显示的图标。
比如你将“http://www.debian.org/”列为“my favorite”的时候,你的“my favorite”清单会显示“http://www.debian.org/favicon.ico”这个图标。
当你的根目录下没有“favicon.ico”这个文件时,“my favorite”里将显示IE浏览器的图标,与此同时“favicon.ico”不存在的信息(404 not found)会写到你的apache2错误日志中去,这样你可以从这个日志中看出,什么时候,什么人(其IP网址)将你的网站设定为“my favorite”。
解决的方法:
1、做个favicon.ico文件放在根目录下,在head标签引入favicon.ico文件即可
<link href="favicon.ico" rel="shortcut icon">
2、在Stack Overflow搜索到的,直接在head标签插入以下代码也OK
<link rel="shortcut icon" href="#" />
Failed to load resource: the server responded with a status of 404 (Not Found) favicon.ico文件找不到的更多相关文章
- 报错解决——Failed to load resource: the server responded with a status of 404 (Not Found) favicon.ico文件找不到
Django项目开发完成后在本地运行没问题,但在推到服务器上后出现报错Failed to load resource: the server responded with a status of 40 ...
- jsp中引入jquery报错:Failed to load resource: the server responded with a status of 404 (Not Found)
问题描述: 今天自己在搭建spring.springMVC.hibernate框架,搭建完成后,在引入jquery时,发现jquery不管用.我的解决顺序是: 1.检查路径,发现路径没错,另外需要注意 ...
- 待解决:2bootstrap-cerulean.css Failed to load resource: the server responded with a status of 404 ()
2bootstrap-cerulean.css Failed to load resource: the server responded with a status of 404 ()
- Failed to load resource: the server responded with a status of 404 (Not Found)
Failed to load resource: the server responded with a status of 404 (Not Found) 报错情况:图标加载失败 原因分析:路径错误 ...
- Spring Boot Failed to load resource: the server responded with a status of 404 ()
出现错误: Failed to load resource: the server responded with a status of 404 () 但是其他页面正常显示: 原因: 浏览器看一下: ...
- ripple Failed to load resource: the server responded with a status of 404 (Not Found)
在VS2015中使用Cordova + typescript开发中,遇到个问题. 在javascript console 中提示: Failed to load resource: the serve ...
- springmvc Failed to load resource: the server responded with a status of 404 (Not Found)
jsp页面导入css.js提示上述问题. Spring对静态资源的请求做专门处理 <!-- 对静态资源的请求 --><mvc:resources location="/js ...
- SSM框架下 Failed to load resource: the server responded with a status of 404 (Not Found)错误
这个错误提示的是js的引用路径有错: 1.检查应用路径是否正确(我的问题是路径是正确的但是去到页面就会提示404错误) 引用路径,最好都使用绝对路径 <script type="tex ...
- glyphicons-halflings-regular.woff2:1 Failed to load resource: the server responded with a status of 404 (Not Found)解决Web部署 svg/woff/woff2字体 404错误
问题:最近在IIS上部署web项目的时候,发现浏览器总是报找不到woff.woff2字体的错误.导致浏览器加载字体报404错误,白白消耗了100-200毫秒的加载时间. 原因:因为服务器IIS不认SV ...
随机推荐
- PXC中的GTIDs
基本环境:PXC 5.7.19 Row+Gtid,3节点 一.Galera GTID vs MySQL GTID 1.1.Galera GTID vs MySQL GTID Both kinds of ...
- python manage.py syncdb Unknown command: 'syncdb'问题解决方法
在django1.9后的版本中,python manage.py syncdb命令修改为python manage.py migrate,执行正常. 选择sqlite可视化sqlitestudio-3 ...
- composer设计原理与基本用法
原文地址:http://blog.turn.tw/?p=1039 COMPOSER進階原理:PHP命名空間與PSR-0 http://blog.turn.tw/?p=1122 Moving PHP ...
- Linux查找文件、文件夹
https://www.jianshu.com/p/f3a46e5c96ba 查找目录:find /(查找范围) -name '查找关键字' -type d 查找文件:find /(查找范围) -na ...
- Ubuntu/Debian 微信安装
1. 更新系统 $ sudo apt-get update $ sudo apt-get install git-core curl build-essential openssl libssl-de ...
- saltstack自动化运维系列②之saltstack的数据系统
saltstack自动化运维系列②之saltstack的数据系统 grains:搜集minion启动时的系统信息,只有在minion启动时才会搜集,grains更适合做一些静态的属性值的采集,例如设备 ...
- ajax相关知识点
AJAX的概念,即“Asynchronous Javascript And XML” 通过在后台(浏览器的后台)与服务器进行少量数据交换,AJAX 可以使网页实现异步更新.这意味着可以在不重新加载整个 ...
- vue系列之项目打包
vue完成项目后,如何打包成静态文件,并且用Node调试 打包 1.修改config里面的index.js里面的productionSourceMap为false,默认情况是true(true代表打包 ...
- Android app 在线更新那点事儿(适配Android6.0、7.0、8.0)
一.前言 app在线更新是一个比较常见需求,新版本发布时,用户进入我们的app,就会弹出更新提示框,第一时间更新新版本app.在线更新分为以下几个步骤: 1, 通过接口获取线上版本号,versionC ...
- nginx配置学习总结
1.nginx反向代理 在讲诉具体的配置之前,先说下正向代理与反向代理的区别. 正向代理:是一个位于客户端和原始服务器(origin server)之间的服务器,为了从原始服务器取得内容,客户端向代理 ...