2

It is very easy to find information about how to deal with problems in Safari tab icons--namely "fix the problems by clearing the icon cache." That is not what this question is about.

I have several web sites. Most of them use favicon file set generated in the standard way and located in the favicons directory in the docroot. Safari is able to pick up the icons as expected. However I have one website for an implementation of the trac issue tracking system. It is picking up an icon from somewhere that I would prefer to use on other sites. The trac website does not appear have any favicon, so it is a mystery as to where it is getting that icon from. My thinking is that if I knew where that file was coming from, I could locate it and use it elsewhere. Or at least control it better.

So my question is more precisely the following: "what is the algorithm that Safari uses to find files to use for tab icons?"

5
  • 1
    Requesting a favicon.ico file is an old convention, and no longer preferred. The modern method is for the website to specify the location in a link tag. See the W3C’s documentation: w3.org/2005/10/howto-favicon Dec 22, 2021 at 20:06
  • Checking the source, I find the following: <link rel="apple-touch-icon" sizes="180x180" href="/favicons/apple-touch-icon.png?v=xQzzjm3vxX"> <link rel="icon" type="image/png" sizes="32x32" href="/favicons/favicon-32x32.png?v=xQzzjm3vxX"> <link rel="icon" type="image/png" sizes="16x16" href="/favicons/favicon-16x16.png?v=xQzzjm3vxX"> However, none of these files are being used for the TAB ICONS on the main site. But they are being used on the trac site. But there is a reference <link rel="icon" href="/rephunter/chrome/common/trac.ico" type="image/x-icon"/>. But I cannot find that file. Dec 23, 2021 at 15:09
  • It doesn't appear that the file exists. I looked at RepHunter.com and see neither the trac.ico file you reference, nor a reference to it in the source. Dec 30, 2021 at 0:37
  • @David - thanks for your comment. Yes you are seeing the same problem. I cannot find the file either, so I don't know how the trac site is getting it. Part of the problem is that the trac website is running on a different server, and so far I have not been able to locate the docroot of that website, and our sysadmin has not been able to find it either. It "should be" trivial once I find out where that docroot is located. The URL of another image file is trac.rephunter.net/rephunter/chrome/common/trac_logo_mini.png. So far I have been searching on the server for that path. Dec 31, 2021 at 20:04
  • I am finding paths like the following: /var/cache/mod_pagespeed/v3/rephunter.net/https,3A/,2Ftrac.rephunter.net/rephunter/chrome/common/trac.ico, This is odd for these reasons: (1) seems like resources coming from mod_pagespeed cache; (2) all the files at that location have a comma appended to the end of the name. I am thinking that somehow mod_pagespeed caching is where the resources of the website appear to be coming from, but the actual docroot and the actual location of the httpd.conf file are still a mystery. Dec 31, 2021 at 20:41

2 Answers 2

2
  • Enable Develop menu in Safari -> Preferences -> Advanced
  • Open Web Inspector (OptCmdI on the page in question
  • Go to the Network tab
  • Search the line where favicon... gets loaded
  • Click on the name to see the URL
2
  • This is useful. However, in Chrome on the main site I see that in fact an expected icon of the ones shown in my comment to the original question is present. And the trac site uses the icon from the path shown there as well. That is, chrome gets icons as expected using the link ref nodes. It is just Safari that does not get the icons as expected. Dec 23, 2021 at 15:12
  • That would make a very good follow on question - show specific sites that break this general item and copy a link to the answer or question so that the two questions are associated in the site... @JeffreySimon
    – bmike
    Apr 12, 2023 at 17:44
0

Check header info (upper portion of HTML file), if there is no info or referencing any image, go ahead and do so. That should overwrite whatever it is using instead.

If there is! Check the location, bring a .ico with a different name, reference it on the header line, refresh the webpage, and that should overwrite it as well.

After those steps, if you would like to have no image on favicon.ico, just create a blank transparent png.

1
  • This answer would be easier to understand with some specific examples.
    – nohillside
    Apr 12, 2023 at 21:19

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .