Open Bug 1253407 Opened 8 years ago Updated 2 years ago

favicon.ico caching issue

Categories

(Toolkit :: Places, defect, P5)

44 Branch
defect

Tracking

()

People

(Reporter: ulli.luftpumpe, Unassigned)

Details

Attachments

(1 file)

User Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:44.0) Gecko/20100101 Firefox/44.0
Build ID: 20160210153822

Steps to reproduce:

I have an HTML page and a web server running. The page contains:
<link rel="icon" href="favicon.ico" type="image/vnd.microsoft.icon" />



Actual results:

When opening the page via http://localhost the specified favicon is ignored and not shown. When removing the favicon line from the HTML code Firefox doesn't look for one automatically.
The favicon is always shown when opening via http://127.0.0.1


Expected results:

Opening http://localhost should show the favicon as http://127.0.0.1 does.
Can you attach your html page as an attachment ?
It would be a nice testcase to lookup the problem.
Thanks
QA Whiteboard: [testday-20160304]
It seems a bit different
Summary: favicon ignored for http://localhost → favicon in ico format ignored for http://localhost and http://127.0.0.1
I've added an attachment. It seems it is not related to "localhost" URI.

The favicon is not shown for the root index page and when using the filename "favicon.ico" moving the page into a subdirectory or renaming and referring the favicon as "favicon_.ico" it is shown. No problems when using a "favicon.png".
Opening the page via "file://" always shows the favicon.

Clearing the Firefox cache doesn't help. I opened the page via "http://localhost/index.html", "http://localhost/index.html" and "http://<my_internet_ip>/index.html" - all not showing the favicon "favicon.ico".
Summary: favicon in ico format ignored for http://localhost and http://127.0.0.1 → favicon.ico ignored, not shown
In the attachment:
 "index1.html" with "favicon1.ico" works always
 "index.html" with "favicon.ico" doesn't work in the root dir
   -> Firefox doesn't even try to load the favicon file here
Component: Untriaged → Location Bar
Hi Mark,

I have test this issue on latest Firefox (44.0.2) release, latest Nightly (47.0a1) build and I could not reproduce it. I have opened the page via "http://localhost/index.html" and the favicon is visible, regardless if I am using the ".ico" or ".png" extensions. I have created a test case (see attachement).

Firefox: 47.0a1, Build ID: 20160306030215
User Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:47.0) Gecko/20100101 Firefox/47.0
Firefox: 44.0.2, Build ID: 20160210153822
User Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:44.0) Gecko/20100101 Firefox/44.0

Can you please test this on the latest Firefox release (44.0.2) or latest Nightly (47.0a1, https://nightly.mozilla.org/) and tell me if this still reproduces for you ? When doing this please use a new fresh Firefox profile, maybe also in safe mode (https://support.mozilla.org/en-US/kb/troubleshoot-and-iagnose-firefox-problems).

Thanks,
Cosmin.
Flags: needinfo?(ulli.luftpumpe)
I think the problem is caused by internal caching or the history (which stores favicons).
When restarting Firefox the favicon is shown properly. Firefox doesn't handle linked favicon files like normal images.


using Firefox 48.0a1:


I open the page via "http://localhost/" with valid link to "favicon.ico". The favicon is shown.

I change the modified date of the HTML file and the filename of "favicon.ico" to "favicon_.ico". The HTML page links now to a not existing file. I refresh the page and Fiddler2 shows the the HTML file is transmitted with HTTP code 200. Firefox didn't request "favicon.ico" which would have resulted in 404. Firefox continues to show the favicon which doesn't exist on the server.

This identifies the problem: Firefox doesn't care about the current favicon on the server anymore and it may happen that Firefox remembers a previous non existing file, so it doesn't load the current one and continues to show none or the wrong one.

The when requesting "http://localhost/favicon.ico" directly in another tab it shows the wrong from the cache, refreshing shows the current one. Changing the HTML page (to avoid response 304 from the server) and refreshing the page it still shows the wrong one!

When writing and testing a HTML file and fiddling with the favicon this behavior of Firefox is annoying.
Flags: needinfo?(ulli.luftpumpe)
Clearing the cache doesn't help most of the time. I cannot force Firefox to reload the favicon other than quit and restart.


Once this bug is removed I expect Firefox to:

1.
request/update the favicon from the server if the page is refreshed and the server doesn't respond 304. If the favicon was first responded with "Cache-Control: no-cache" it even needs to be reloaded if 304 is responded for the embedding page (not sure if it does already.)

2.
update the favicon cache when I open and refresh the favicon directly. Then when refreshing a tab which still shows the old favicon it must show the new (current) favicon upon refresh, also if the server responds with 304 just for the page.
Summary: favicon.ico ignored, not shown → favicon.ico caching issue
Component: Location Bar → Places
Product: Firefox → Toolkit
Status: UNCONFIRMED → NEW
Ever confirmed: true
Priority: -- → P5
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: