报错解决——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 404 (Not Found) favicon.ico文件找不到。
仔细对照路径查看确实没有favicon.ico文件,但为什么本地跑没关系推到服务器就必须要这个文件呢?这个文件又是什么文件呢?
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)会写到你的项目的错误日志中,这样你可以从这个日志中看出,什么时候,什么人(其IP网址)将你的网站设定为“my favorite”。
解决方法:
1、做个favicon.ico文件放在根目录下,在head标签引入favicon.ico文件即可
<link href="favicon.ico" rel="shortcut icon">
2、不愿意做图标或者还没想好图标做成什么样,可以直接在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文件找不到
今天使用sublime以localhost方式打开html文件时(使用wamp环境提供一个Apache服务器,html文件存在于wamp环境的www文件夹下),出现favicon.ico文件找不到 ...
- jsp中引入jquery报错:Failed to load resource: the server responded with a status of 404 (Not Found)
问题描述: 今天自己在搭建spring.springMVC.hibernate框架,搭建完成后,在引入jquery时,发现jquery不管用.我的解决顺序是: 1.检查路径,发现路径没错,另外需要注意 ...
- chrome浏览器调试报错:Failed to load resource: the server responsed width a status of 404 (Not Found)…http://127.0.0.1:5099/favicon.ico
chrome浏览器在调试的时候默认会查找根目录下的favicon.ico文件,如果不存在就会报错. 解决办法:F12,点击<top frame>左侧漏斗形状的filter,勾选上" ...
- 待解决: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) 报错情况:图标加载失败 原因分析:路径错误 ...
- 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 ...
- 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 () 但是其他页面正常显示: 原因: 浏览器看一下: ...
- Failed to load resource: the server responded with a status of 404 ()
今天遇到了一个一开始感觉很莫名其妙的报错 在编写页面的时候把原先写在html页面里的js代码单独拿出来做成一个JavaScriptUtil文件,放在了和html页面同一个目录下.运行之后在对应的页面c ...
- 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 ...
随机推荐
- 【12月21日】A股滚动市盈率PE历史新低排名
2010年01月01日 到 2018年12月21日 之间,滚动市盈率历史新低排名.上市三年以上的公司,2018年12月21日市盈率在300以下的公司. 1 - 厦门象屿(SH600057) - 历史新 ...
- rem布局在react中的应用
摘要: 前面给大家分享了一个react项目(http://www.cnblogs.com/xiyangbaixue/p/4751904.html),这次对这个项目做了一些改进,增加了rem布局和对is ...
- [Tensorflow] RNN - 01. Spam Prediction with BasicRNNCell
Ref: http://blog.csdn.net/mebiuw/article/details/60780813 Ref: https://medium.com/@erikhallstrm/hell ...
- php MongoDB driver 查询实例
//是否只查mx $mx_on_switch = I("post.mx_on_switch"); //mx模糊查询 $mx_vague_check = I("post.m ...
- 如何将Unicode文本写到日志文件中
有时为了定位问题,我们需要结合打印日志来处理.特别是较难复现的,一般都需要查看上下文日志才能找出可能存在的问题.考虑到程序要在不同语言的操作系统上运行,程序界面显示要支持Unicode,打印出来的日志 ...
- 查看,设置,设备的 竖屏-横屏模式 screen.orientation
<body> <div id="doc"></div> <div id="model"></div> ...
- go语言字符串处理
string包: 查找字串是否在指定的字符串中:strings.Contains("seafood", "foo")//true ...
- ThinkPHP框架 做个简单表单 添加数据例子__ACTION__ __SELF__
public function zhuCe(){//自定义zhuCe方法和zhuCe显示表里的__ACTiON__这个相互交接 //实现两个逻辑 //1,显示注册页面 //2.向数据库添加内容 //自 ...
- Sql Server :SELECT a.*,b.HZXM FROM YG_LIS_JCBYTK a(nolock)中的NOLOCK作用
转自 http://blog.csdn.net/xingxing1828/article/details/34850771 先说下其区别,之后再做测试. 大家都知道,每新建一个查询,都相当于创建一个会 ...
- 用SignalTap进行硬件仿真
写在前面:本博客为本人原创,严禁任何形式的转载!本博客只允许放在博客园(.cnblogs.com),如果您在其他网站看到这篇博文,请通过下面这个唯一的合法链接转到原文! 本博客全网唯一合法URL:ht ...