报错解决——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 ...
随机推荐
- jenkins 启动slave时,找不到合适的java程序
今天添加slave 又不成功,我用右键,发现随意点了java的那个打开,结果刚弹出来就关闭了窗口,显示未启动成功. 真是小白的想法,不过跟工具打交道久了,多少逻辑上想一下不对. 一定是用了不合适的程序 ...
- duilib进阶教程 -- TreeView控件的不足 (7)
上一个教程中,虽然播放列表的框架和迅雷一样了,但是字体大小.文字居中还没有解决.如果是刚学duilib,搞定这个可不容易,因为在有了入门教程的指导后,很容易就想到去看[属性列表.XML],但是当你试了 ...
- 使用Anaconda3配置多版本Python虚拟开发环境
有时候,为了使用比较干净的开发环境,或者为了测试一些版本的扩展库,我们可能需要创建虚拟开发环境,在不同的虚拟开发环境中,只安装需要的扩展库,这样可以最大程度上减少不同扩展库之间的兼容性带来的冲突或其他 ...
- C# Post HTTP Request
using System; using System.Collections.Generic; using System.IO; using System.Net; using System.Secu ...
- java转换图片压缩生成webp格式
http://blog.csdn.net/xu_san_duo/article/details/79085718
- Docker简介及Linux下安装
什么是Docker? Docker是一个开源的引擎,可以轻松的为任何应用创建一个轻量级的.可移植的.自给自足的容器.开发者在笔记本上编译测试通过的容器可以批量地在生产环境中部署,包括VMs(虚拟机). ...
- Linux/Unix 常用参数使用说明
参数使用说明 ~ 表示当前用户目录 绝对路径 .表示当前目录 绝对路径 | 命令格式:命令A|命令B,即命令1的正确输出作为命令B的操作对象(下图应用别人的图片) 举例 ps aux | grep & ...
- MyEclipse中同时启动两个tomcat
开发的时候,有些时候需要同时启动两个项目.首先配置tomcat,方法如下:(转载自:http://bendan123812.iteye.com/blog/1716789) 一.把Tomcat复制一份并 ...
- keil 生成 bin文件
D:\Keil_v5\ARM\ARMCC\bin\fromelf.exe --bin -o $L@L.bin #L 这个就是keil的默认安装路径
- mapReducer第一个例子WordCount
mapreducer第一个例子,主要是统计一个目录下各个文件中各个单词出现的次数. mapper package com.mapreduce.wordCount; import java.io.IOE ...