We're calling on all EU-based Mozillians with iOS or iPadOS devices to help us monitor Apple’s new browser choice screens. Join the effort to hold Big Tech to account!

搜索 | 用户支持

防范以用户支持为名的诈骗。我们绝对不会要求您拨打电话或发送短信,及提供任何个人信息。请使用“举报滥用”选项报告涉及违规的行为。

详细了解

Favicon requests are made to root path even if an explicit load direction exists

more options

I'm using Firefox/39.0 to open an intranet site.

The site contains the below tag in header: <link rel="icon" type="image/x-icon" href="theme/images/favicon.ico">

I would expect that Firefox would always try to load the favicon from the given path theme/images/favicon.ico. However, sometimes it tries to load the favicon from the root path /favicon.ico

The first time that I open the browser and navigate to the intranet site, I can see the GET request to retrieve the favicon. If I close the browser, reopen it, navigate to the site and press Ctrl + F5 multiple times, then I see some requests to the root path /favicon.ico. Do you have any idea why this happens? I would appreciate any hint.

[21/Jul/2015:21:12:01 +0300] "GET /myapp/theme/images/favicon.ico HTTP/1.1" 200 4286 "-" "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:39.0) Gecko/20100101 Firefox/39.0" [21/Jul/2015:21:15:08 +0300] "GET /favicon.ico HTTP/1.1" 302 - "-" "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:39.0) Gecko/20100101 Firefox/39.0"

I'm using Firefox/39.0 to open an intranet site. The site contains the below tag in header: <link rel="icon" type="image/x-icon" href="theme/images/favicon.ico"> I would expect that Firefox would always try to load the favicon from the given path theme/images/favicon.ico. However, sometimes it tries to load the favicon from the root path /favicon.ico The first time that I open the browser and navigate to the intranet site, I can see the GET request to retrieve the favicon. If I close the browser, reopen it, navigate to the site and press Ctrl + F5 multiple times, then I see some requests to the root path /favicon.ico. Do you have any idea why this happens? I would appreciate any hint. [21/Jul/2015:21:12:01 +0300] "GET /myapp/theme/images/favicon.ico HTTP/1.1" 200 4286 "-" "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:39.0) Gecko/20100101 Firefox/39.0" [21/Jul/2015:21:15:08 +0300] "GET /favicon.ico HTTP/1.1" 302 - "-" "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:39.0) Gecko/20100101 Firefox/39.0"

所有回复 (2)

more options

It is possible that Firefox already tries to request the favicon before waiting for the arrival of the main HTML file.

You could check the requests via the Live Http Headers extension.

more options

cor-el said

It is possible that Firefox already tries to request the favicon before waiting for the arrival of the main HTML file.

According W3C HTMl5 Links Recommendation: "In the absence of a link with the icon keyword, for Documents obtained over HTTP or HTTPS, user agents may instead attempt to fetch and use an icon with the absolute URL obtained by resolving the URL "/favicon.ico" against the document's address, as if the page had declared that icon using the icon keyword.".

So, I suppose that in case a link with icon keyword exists, Firefox should not perform a request to the root path.