Recently I have been working more and more with HTML and frontend development in general and had the task of loading favicons from various addresses to make links more visually attractive.
Here I came across a hidden Google API to load favicons.
Google Favicon API
Google offers a hidden, central API that returns favicons as jpegs - and in different sizes. I have seen this in Google’s own services, whereby the subsequent image is delivered via gstatic.com; Google’s CDN.
https://www.google.com/s2/favicons?domain=${tld}&sz=${pixel-size}
For my blog, this can look like this:
https://www.google.com/s2/favicons?domain=schwabencode.com&sz=128
where the size is optional and 16 pixels are returned in the standard and fallback cases.
Alternatives
In addition to Google, Icon Horse also offers a functionally identical API
And the search engine operator DuckDuckGo also offers such an API:
Related articles
Feb 18, 2015 · 4 min read
Aggressive Client Caching mit Hilfe von HTML 5 Manifesten
Die Anforderung von Webseiten in puncto Performance und Datenmengen steigen immer weiter an. Dies führt dazu, dass das Caching für Webseiten …
Oct 17, 2013 · 1 min read
Auto-Vervollständigung von HTML-Eingabefeldern in Formularen deaktivieren
Oft nützlich, manchmal nicht erwünscht: die Auto-Vervollständigung von Formularen im Web. Folgendes Attribut deaktiviert das standardmäßige …
Feb 03, 2016 · 16 min read
Eine moderne WebAPI - die OData Basics
Was ist OData? Doch zunächst etwas Vorgeschichte Seit es Schnittstellen (API) zum Austausch von Daten gibt, gibt es die Unsicherheit, welche …
Let's Work Together
Looking for an experienced Platform Architect or Engineer for your next project? Whether it's cloud migration, platform modernization or building new solutions from scratch - I'm here to help you succeed.

Comments