# Regression? Apple touch instead of favicon displayed again as favicon (Firefox)

**URL:** <https://meta.discourse.org/t/regression-apple-touch-instead-of-favicon-displayed-again-as-favicon-firefox/34151>\
**Category:** UX\
**Created:** [2015 年10 月 5 日 17:03 UTC](https://meta.discourse.org/t/regression-apple-touch-instead-of-favicon-displayed-again-as-favicon-firefox/34151 "2015-10-05T17:03:38Z")\
**Posts on this page:** 1\
**Showing post:** 9

<div class="post-metadata">

作者： ![Pietro\_Saccardi\_Spak](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pietro_saccardi_spak/32/121488_2.png) [@Pietro\_Saccardi\_Spak](https://meta.discourse.org/u/Pietro_Saccardi_Spak)\
发布日期： [2016 年10 月 7 日 10:27 UTC](https://meta.discourse.org/t/regression-apple-touch-instead-of-favicon-displayed-again-as-favicon-firefox/34151/9 "2016-10-07T10:27:37Z")

</div>

I am experiencing the same problem. Discourse inserts _three_ `<link rel>` in the web page.

1. `<link rel="icon" href="FAVICON">` The actual favicon item. Currently Discourse also prints `type="image/png"`, although one may have uploaded a .ico file `image/x-icon`.
2. `<link rel="apple-touch-icon" ...` The apple touch icon.
3. `<link rel="icon" sizes="144x144" href="APPLE TOUCH ICON">` The `rel="icon"` attribute will tell Firefox that this is a favicon. Firefox loads the file as favicon and overrides item no. 1.

I tested with Firefox 49 and removing item no. 3 causes Firefox to correctly load the favicon, without affecting the apple touch icon. So my question:

**Why is it item 3 even produced?** It is not needed for either favicon or apple touch icon; moreover, it links to the wrong file (the apple touch icon rather than the favicon). Favicons and Touch icons serve two completely different purposes and in particular the latter has very different styling conventions, so they should not be mixed up in my opinion. Removing it would fix the visualization issues.

**Why is the mime type and the size hardcoded?** The browser will anyway deduce this, and hardcoded sizes are no useful, unless the media really matches. But then it would make sense to provide _more_ sizes for the same media, which is the reason why originally the attribute `size` exists. If only one media is provided, the size doesn’t matter.

My suggestion is to drop item 3. and all the `sizes` and `type` attributes.

**edit:** Tested on iPad, iPhone, Firefox 49, Chrome 53, it seems to work smoothly and displays the correct icons.  
I created a [PR](https://github.com/discourse/discourse/pull/4481).

---

_[View the full topic](https://meta.discourse.org/t/regression-apple-touch-instead-of-favicon-displayed-again-as-favicon-firefox/34151)._
