Fun fact: fetching favicons from
various domains is a dark art. Might seem trivial at first, but it’s very
complicated. A simple request for a favicon.ico
will net strange returns —
like serving a text file as a favicon.ico
.
Better to leverage a browser which excels at interpreting favicons or contact a of a major search engine. Make sure to cache the results.
- https://icons.duckduckgo.com/ip1/en.wikipedia.org.ico
- https://www.google.com/s2/favicons?domain=en.wikipedia.org