如何从询问的图标prevent浏览器? [英] How to prevent the browser from asking for the favicon?

查看:192
本文介绍了如何从询问的图标prevent浏览器?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有一定的指导,我可以在我的HTML中使用告诉浏览器不要问的图标?

Is there some directive I could use in my HTML to tell the browser not to ask for the favicon?

推荐答案

没有,我不觉得有什么。从维基百科

No, I don't think there is. From Wikipedia:

大多数Web浏览器不需要任何HTML检索符合位于Web站点的根事实上的文件名和类型(的favicon.ico)一个图标。如果在HTML页面加载完成,并没有previous现场访问记录在浏览器的历史没有检测到图标的链接,一个favicon.ico的自动请求。[8]

Most web browsers do not require any HTML to retrieve a favicon that conforms to the de facto file name and type (favicon.ico) located in the web site's root. If no favicon link is detected upon HTML page load completion and no previous site visits are recorded in the browser's history, a favicon.ico is requested automatically.[8]

您可以做的是明确的浏览器指向到其他位置的唯一的事(即例如可以返回的 204无内容

The only thing you could do is explicitly point the browser to a different location (that for example could return a 204 no content)

<link rel="shortcut icon" href="http://www.example.com/my_empty_resource" />

这篇关于如何从询问的图标prevent浏览器?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆