龙虾怎么杀网站favicon.icoo

1、google,baidu这些站点的favicon.ico图片是哪里设置的,查看其首页的源代码,怎么都找不到类似这样的语句:
&&& &link rel="icon" href="favicon.ico" type="image/x-icon" /&
2、在本地新建一个HTML文件,然后设置favicon.ico,在Firefox下,都能正常显示,但在IE8下却一直显示不出来。缓存,访问记录等全部都清空了,还是不行。是不是说在本地不行,要传到服务器上才行呢?
我也看这百度的首页源代码,确实没看到类似&link type="image/x-icon" rel="shortcut icon" href="favicon.ico" /&的代码。。难道是默认放在根目录就ok了?求高人解决。
&link type="image/x-icon" rel="shortcut icon" href="favicon.ico" /& 写上这个就可以了,我在开发的时候遇到了,360和火狐不行,后来将缓存清空了,就好了,不过360的情况方法不一样,要找到具体保存ico的目录去删除(360默认使用第一次保存的ico缓存)
1. 文件名就叫favicon.ico
2. 文件就是放在Web根目录,不要放在images里,有的浏览器不认
3. &link type="image/x-icon" rel="shortcut icon" href="favicon.ico" /&
4. 可能由于缓存,把tomcat里work\localhost和webapp目录下你的项目删除掉,重新部署到tomcat
5. 有的可能就是显示不了,比如IE6
我在开发时就是这么写的,IE7 8, FireFox, Chrome都没问题
希望对你有帮助
IE显示favicon是有问题的,你把链接地址加到IE的收藏夹里面应该是可以看到favicon的
已解决问题
未解决问题服务器缺少favicon.ico影响网站速度
作者:admin&&&&时间: 22:9:49&&&&浏览:
尽管做网站好多年了,但一直忽视favicon.ico这个图标,也许大家设置favicon.ico的目的,是为了在浏览器上显示时更好看点,更能个性化网站,但我认为没有这个必要。不过,今天我要说的是,我之前的看法是不对的,任何网站都应该设置一个favicon.ico图标,不是为了好看,也不是为了个性化,而是为了优化。为什么今天说在网站上设置了favicon.ico,就可以优化网站速度呢?难道服务器缺少favicon.ico就影响网站速度吗?答案是肯定。Yahoo:减小favicon.ico体积和缓存favicon.ico在Yahoo的网站速度优化建议里,有一条是:减小favicon.ico体积和缓存favicon.ico。它是怎么解释的呢?看看那Yahoo的解释:favicon.ico是一个放在服务器根目录的图片,这是必需的,因为即使你不关心它但是浏览器一样会请求它,所以最好不要响应&404未找到&。另外,由于它放在相同的服务器上,每次它被请求的时候,都会发送cookies。这张图标也会干扰下载顺序,例如在IE中,当在onload时你请求额外的组件,favicon将先于这些额外组件下载。所以为了减轻favicon.ico带来的弊端,请确保:它是小体积的,最好在1K以内。使用你觉得合适的方法设置过期标头(因为当你要改变它时你不能重命名它),你可以安全地设置过期标头为几个月的时间,你可以检测你现在的favicon.ico的最后修改时间以做出合适的决定。Imagemagick能帮助你创建一个小体积的图标。卡卡网站速度诊断:缺少favicon.ico响应404错误在卡卡网的(/)里,如果网站缺少favicon.ico图标,那么就返回一条404的错误提示。
缺少favicon.ico响应404错误(点击图片放大)缺少favicon.ico响应404错误,符合Yahoo的优化规则,而响应404的错误提示,势必会影响网站的速度,在上图中,我们清楚的看到,浏览器请求favicon.ico时等待时间用了62ms。在Google的网站速度优化建议中,也提到&&,因为&错误的请求会增加请求时间,应尽量避免&。
把文章分享到:
QQ交流群()如何清理 Chrome 浏览器的 favicon 缓存呢? - V2EX
V2EX = way to explore
V2EX 是一个关于分享和探索的地方
已注册用户请 &
· 在 Chrome 里使用 vim 快捷键
Sponsored by
填完简历,机会就来了,还有招聘体验师服务整个求职过程。这就是人才拍卖,专为 20 万年薪以上的中高端互联网人打造的求职服务平台。
Promoted by
如何清理 Chrome 浏览器的 favicon 缓存呢?
10:13:00 +08:00 · 2881 次点击
貌似 Chrome & Clear Browsing Data & Empty the cache 对 favicon 无效。
3 回复 &| &直到
13:31:45 +08:00
& & 10:35:08 +08:00
打开新的 tab ,
然后 Shift+Reload.
& & 10:45:00 +08:00 via Android
先直接访问favicon地址然后打开网页shift之,大多数都能生效。
& & 21:52:01 +08:00
cd /Users/USERNAME/Library/Application\ Support/Google/Chrome/Default
rm Favicons Favicons-journal
& · & 1500 人在线 & 最高记录 1630 & · &
创意工作者们的社区
World is powered by solitude
VERSION: 3.9.5 · 40ms · UTC 02:01 · PVG 10:01 · LAX 18:01 · JFK 21:01? Do have faith in what you're doing.How to prevent favicon.ico requests? - Stack Overflow
to customize your list.
Stack Overflow is a community of 4.7 million programmers, just like you, helping each other.
J it only takes a minute:
Join the Stack Overflow community to:
Ask programming questions
Answer and help your peers
Get recognized for your expertise
I don't have a favicon.ico, but IE always makes a request for it.
Is it possible to prevent the browser to make a request for the favicon of my site? Maybe some META-TAG in the HTML header?
2,54241928
11.5k2582113
I will first say that having a favicon in a Web page is a good thing (normally).
However it is not always desired and sometime developers need a way to avoid the extra payload. For example an IFRAME would request a favicon without showing it.
Worst yet, in Chrome and Android an IFRAME will generate 3 requests for favicons:
"GET /favicon.ico HTTP/1.1" 404 183
"GET /apple-touch-icon-precomposed.png HTTP/1.1" 404 197
"GET /apple-touch-icon.png HTTP/1.1" 404 189
The following uses data URI and can be used to avoid fake favicon requests:
&link rel="shortcut icon" href="data:image/x-," type="image/x-icon"&
For references see here:
The Chrome bug/behavior will probably be fixed in upcoming versions.
Here is the bug submission for you to vote:
From the comments (jpic) it looks like Firefox >= 25 doesn't like the above syntax anymore. I tested on Firefox 27 and it doesn't work while it still work on Webkit/Chrome.
So here is the new one that should cover all recent browsers. I tested Safari, Chrome and Firefox:
&link rel="icon" href="data:;base64,="&
I left out the "shortcut" name from the "rel" attribute value since that's only for older IE and versions of IE & 8 doesn't like dataURIs either. Not tested on IE8.
If you need your document to validate against HTLM5 use this instead:
&link rel="icon" href="data:;base64,iVBORw0KGgo="&
You can't. All you can do is to make that image as small as possible and set some cache invalidation headers (Expires, Cache-Control) far in the future. Here's
about favicon.ico requests.
87.5k14132162
I believe I've seen this (I haven't tested it or used it personally though):
&link rel="shortcut icon" href="#" /&
Anyone had similar experience?
I just tested the above snippet and on a forced full refresh, no favicon requests were seen in Fiddler. I tested against IE8 (Compat mode as IE7 standards) and FF 3.6.
4,64541947
There's a bunch of good answers, but I think the best answer as well as discussion of alternatives is on this .
The best seemed to be base64 encode the image in js, and feed the favicon link with a hash - the latter suggested above.
A few other variations were proposed as well.
1,03311115
You can use .htaccess or server directives to deny access to favicon.ico, but the server will send an access denied reply to the browser and this still slows page access.
You can stop the browser requesting favicon.ico when a user returns to your site, by getting it to stay in the browser cache.
First, provide a small favicon.ico image, could be blank, but as small as possible. I made a black and white one under 200 bytes. Then, using .htaccess or server directives, set the file Expires header a month or two in the future. When the same user comes back to your site it will be loaded from the browser cache and no request will go to your site. No more 404's in the server logs too.
If you have control over a complete Apache server or maybe a virtual server you can do this:-
If the server document root is say /var/www/html then add this to /etc/httpd/conf/httpd.conf:-
Alias /favicon.ico "/var/www/html/favicon.ico"
&Directory "/var/www/html"&
&Files favicon.ico&
ExpiresActive On
ExpiresDefault "access plus 1 month"
&/Directory&
Then a single favicon.ico will work for all the virtual hosted sites since you are aliasing it. It will be drawn from the browser cache for a month after the users visit.
For .htaccess this is reported to work (not checked by me):-
AddType image/x-icon .ico
ExpiresActive On
ExpiresByType image/x-icon "access plus 1 month"
A very simple solution is put the below code in your .htaccess. I had the same issue and it solve my problem.
&IfModule mod_alias.c&
RedirectMatch 403 favicon.ico
&/IfModule&
Reference:
3,11432940
You could use
&link rel="shortcut icon" href="http://localhost/" /&
That way it won't actually be requested from the server.
Your Answer
Sign up or
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Post as a guest
By posting your answer, you agree to the
Not the answer you're looking for?
Browse other questions tagged
Stack Overflow works best with JavaScript enabled在线透明favicon ico图标文件制作 - aTool在线工具
支持格式 png、jpg、gif 在线转换成透明.ico图标。
请上传你要转换成 favicon.ico 的图片
在线生成favicon.ico图标
favicon.ico预览
favicon.ico介绍 | What Is Favicon Ico
所谓favicon,即Favorites Icon的缩写,顾名思义,便是其可以让浏览器的收藏夹中除显示相应的标题外,还以图标的方式区别不同的网站。当然,这不仅仅是Favicon的全部,根据浏览器的不同,Favicon显示也有所区别:在大多数主流浏览器如FireFox和Internet Explorer (5.5及以上版本)中,favicon不仅在收藏夹中显示,还会同时出现在地址栏上,这时用户可以拖曳favicon到桌面以建立到网站的快捷方式;除此之外,标签式浏览器甚至还有不少扩展的功能,如FireFox甚至支持动画格式的favicon等。
favicon.ico图标是网站的缩略标志,可以显示在浏览器标签、地址栏左边和收藏夹,是展示网站个性的缩略logo标志,也可以说是网站头像,如果要让网站看起来更专业、更美、更有个性,favicon.ico是必不可少的,所以你在本站使用ICO图标转换工具就可以轻松达到你的要求。
在我们的网站建设中,为网站打造一个契合网站主题的个性化标志则是必需的,这直接关系到能否成功地塑造网站的品牌。这从某些角度看仍在网站推广的范畴之内,而欲取得成功,不仅包括良好的页面设计、令人印象深刻的网站Logo,也包括favicon。
从特定的技术角度看,favicon也并不只是仅仅让网站给人更专业的观感,也可以在一定程度上减轻服务器的流量带宽占用:一般为了提高网站的可用性,我们都会为自己的网站创建一个自定义的404错误文件,在这种情况下,如果网站没有相应的favicon.ico文件,每当有用户收藏网站/网页时, Web服务器都会调用这个自定义的404文件,并在网站的错误日志中记录。这显然是应该予以避免的。
favicon.ico如何调用? | How To Use Favicon
在网页程序代码的head与/head之间加入下以代码:
如何制作favicon.ico图标 | How To Do
利用自己熟悉的图形软件制作 16*16 像素或 32*32 像素或 48*48 像素的效果图,保存为 .png 或 .gif 或 .jpg 格式的图片。
打开http://www.atool.org浏览刚保存的图片。
点击:"在线生成favicon.ico图标"。
按提示保存,并上传至网站根目录了。
怎么制作透明的favicon.ico图标 | How To Do
利用PS制作透明的png图标。
打开本工具浏览刚保存的图片。
点击:"在线生成favicon.ico图标"。
按提示保存,并上传至网站根目录了。
favicon.ico如何更新? | How To Update
关闭所有打开的浏览器,并清空浏览器缓存。
打开网站并加入收藏夹。
关闭浏览器,重新打开网站,就更新了。
若此时还未更新.ico图标,请稍等一会再打开浏览尝试。
如果使用的火狐或者chrome浏览器,则更新更加简单,使用火狐和chrome的隐私模式进行浏览即可更新缓存。
推荐功能 / 猜你喜欢 | Suggest
评论 | Comments
公众号: atool-org}

我要回帖

更多关于 网站favicon.ico 的文章

更多推荐

版权声明:文章内容来源于网络,版权归原作者所有,如有侵权请点击这里与我们联系,我们将及时删除。

点击添加站长微信