Favicon requests are made to root path even if an explicit load direction exists
Categories
(Firefox :: Tabbed Browser, defect)
Tracking
()
People
(Reporter: tolisemm, Unassigned)
References
Details
Attachments
(3 files)
|   | ||
| Updated•10 years ago
           | 
| Comment 1•10 years ago
           | ||
| Comment 2•10 years ago
           | ||
|   | Reporter | |
| Comment 3•10 years ago
           | ||
Firefox 74.0 exhibits this behaviour too. Intermittent requests are made for 'favicon.ico' at the host's root (i.e. GET /favicon.ico) despite the source document specifying alternate, non-root href paths via rel="icon".
Some additional investigation details are available at https://github.com/grocy/grocy/pull/692
| Comment 6•5 years ago
           | ||
I created a basic testcase and was unable to reproduce this. Are there any additional things needed to reproduce this?
(In reply to Dave Townsend [:mossop] (he/him) from comment #6)
Created attachment 9137845 [details]
test_icon.htmlI created a basic testcase and was unable to reproduce this. Are there any additional things needed to reproduce this?
Thanks - I've taken your file and developed a minimal repro case. This required copying it into two files, and running a small local web server for Firefox to make requests to.
Repro steps:
- Download attachments test-1.html, test-2.html
- Begin a local basic Python3 web server
python3 -m http.server --bind 127.0.0.1 8000
- Navigate Firefox to the first test file
firefox http://127.0.0.1:8000/test-1.html
- Open the Web Developer 'Network' tab by pressing `CTRL+Shift+E'
- Update the address in the browser to 'http://127.0.0.1:8000/test-2.html' and press 'Enter'
- Press the 'Go back one page' button to navigate back to 'test-1.html'
- Press the 'Go forward one page' button to return to 'test-2.html'
Expected Behavior:
- After navigating forwards to 'test-2.html' at step 7, a single favicon request is made to 'subdir/favicon.subdir.ico'
Actual Behavior:
- After navigating forwards to 'test-2.html' at step 7, two favicon requests are made -- one to 'favicon.ico', and one to 'subdir/favicon.subdir.ico'
|   | ||
| Comment 10•4 years ago
           | ||
I think the problem here relates to the way that addRootIcon is called from LinkHandlerChild.onPageShow.
To resolve a previous bug (https://bugzilla.mozilla.org/show_bug.cgi?id=1483910) the seenTabIcon flag is cleared during the onPageHide event handler.  When a page-back and then subsequent page-forward event occurs, the page is hidden, the flag is cleared, and then when the page is re-opened, onPageShow is called and will call addRootIcon as explained previously.
| Updated•3 years ago
           | 
Description
•