Safari favicons broken

Yesterday I noticed that favicons in the Safari tab bar were behaving oddly. I’m on Ventura 13.7.5, Safari 18.4.

The symptom is that the favicon is either missing, or wrong. For example. all tabs may have the icon from the first tab opened, e.g. a star since that’s the favicon for the New Tab page.

(This isn’t strictly true: I have two tabs that open with Safari because they’re always open, and those two tabs are fine. It is tabs opened later that are the problem.)

Clearing the Safari caches (Debug > Empty Caches) didn’t help. So I quit Safari and deleted ~/Library/Safari/Favicon Cache. This fixed the problem!

…but only temporarily. After awhile the problem returned.

Has anyone else seen this?

First thing to try would be to update to the latest versions: Ventura 13.7.6 and Safari 18.5.

Yeah, I was thinking the same thing. I plan to do that next Friday.

Today, before I updated Safari, I tried to open a set of bookmarks and Safari crashed. Re-launch took a long time, but when it was up, the problem with the favicons appears to be solved.

If it is fixed, and this is what fixed it, then my theory is that there was some Safari database that was corrupt, and after the crash Safari repaired it.

But I can’t know for sure, because the next thing I did was update Safari from 18.4 to 18.5.