Favicon request not showing in network tab of developer toolbars

后端 未结 1 898
轮回少年
轮回少年 2021-02-07 03:03

I\'ve set up my ASP.NET MVC app with a favicon in the Content folder (instead of the root) along these lines. This works well, the favicon shows in all browsers.

Howeve

相关标签:
1条回答
  • 2021-02-07 03:31

    All browsers fetch /favicon.ico by default to use it in the address bar, tabs, bookmarks etc. It's just a convention (and W3C doesn't like it).

    Using Chrome you can see this request here: chrome://net-internals/#events.

    net-internals events panel

    You can override the icon using <link rel="shortcut icon" href="http://test.com/myicon.ico" /> HTML tag in the <head> section. This seems to prevent Chrome from checking the default location. However, even with this tag set up Chrome DevTools are not displaying favicon.ico as a resource that was downloaded during the page load. The reason for this may be that favicon is not used by the website, it's used by the browser. The browser request it for it's own purposes.

    [EDIT] There is an open Chrome issue classifying missing favicon.ico in the Network panel as a bug. [EDIT] Its also a bug in a Firebug.

    0 讨论(0)
提交回复
热议问题