為了改善您的使用體驗,本網站正在進行維護,部分功能暫時無法使用。若本站的文件無法解決您的問題,想要向社群發問的話,請到 Twitter 上的 @FirefoxSupport 或 Reddit 上的 /r/firefox 發問,我們的社群成員將很快會回覆您的疑問。

搜尋 Mozilla 技術支援網站

防止技術支援詐騙。我們絕對不會要求您撥打電話或發送簡訊,或是提供個人資訊。請用「回報濫用」功能回報可疑的行為。

了解更多

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.