Favicon on Safari #3230
Replies: 3 comments 1 reply
-
I don't know if it would make a difference, but instead of a blank data attribute in the icon maybe using a single transparent pixel will work to get updated later like in other browsers: |
Beta Was this translation helpful? Give feedback.
-
Looping in @salonijain3, as we discussed this last week and it seemed that the issue was resolved. It doesn't seem so judging by this, maybe this deserves another look. |
Beta Was this translation helpful? Give feedback.
-
Closing this discussion. We added the favicon at the root on bacom and this solved the issue on safari |
Beta Was this translation helpful? Give feedback.
-
[This post is mostly informational, but please share your thoughts if you have other solutions.]
The Problem:
The favicon doesn't display on bacom on safari. It shows a generic letter instead.
Background:
In milo, we delay loading the favicon for performance reasons. This is done by adding an icon link with an empty data url
<link rel="icon" href="data:," size="any"/>
which prevents most browsers from automatically looking for the favicon at the root.
Then, we load the real favicon later in
documentPostSectionLoading()
by updating the link's href.This delays the network request for the favicon, allowing other more high priority items to go first, which helps performance.
However, this doesn't work on safari. Safari makes a request for the favicon at the root (e.g. business.adobe.com/favicon.ico), which 404s for bacom.
This problem doesn't show up on prod for CC, DC, homepage, etc. because safari requests www.adobe.com/favicon.ico, which is a valid URL coming from AEM dexter (content header is AEM-Offers).
Conclusion:
For now, we're going to add a favicon at the root for bacom (business.adobe.com/favicon.ico), so that the favicon shows up on safari.
Considering CRUX data isn't gathered on safari, it doesn't seem like a problem from a performance standpoint, and we'll still gain the performance benefit on other browsers. The downside is that we have to maintain the favicon in two places. I didn't find any solutions for delaying the favicon in safari with the limited research I did, but if anyone knows a cross-browser solution, please share!
For non-bacom consumers:
Ticket: https://jira.corp.adobe.com/browse/MWPW-162313
Beta Was this translation helpful? Give feedback.
All reactions