加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 综合聚焦 > 资源网站 > 资源 > 正文

html – 如何防止浏览器要求图标?

发布时间:2020-12-14 21:35:33 所属栏目:资源 来源:网络整理
导读:有没有一些我可以在HTML中使用的指令来告诉浏览器不要求图标? 解决方法 不,我不认为有。从 Wikipedia: 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 th
有没有一些我可以在HTML中使用的指令来告诉浏览器不要求图标?

解决方法

不,我不认为有。从 Wikipedia:

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 no content)

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

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读