danielmorrisey.com/favfinder
FavFinder
FavFinder is simple tool that fetches, caches, and serves favicons from any website.
try it
usage
Basic fetch
Pass a domain as the path to get its favicon.
Larger icon
Request a 128px icon or SVG when available with ?larger=true. Falls back gracefully if unavailable.
Custom fallback
Supply a ?default-avatar= URL to redirect to if no favicon is found, instead of the BlueAT default.
Strict 404
Set ?throw-error-on-404=true to receive a 404 response instead of a redirect when no favicon is found.
In an HTML image tag
Drop it into any <img> to show a site's favicon alongside its name.
how it works
Cache check
The Worker checks the local Cloudflare PoP cache first, then the global KV store. A hit at either layer returns immediately — no origin fetch required.
Fetch pipeline
On a miss, the Worker runs a four-step pipeline: HTML parsing for <link rel="icon"> tags, direct /favicon.ico probe, and Google S2 fallback at 32px (or 128px with ?larger=true).
Edge caching
Results are stored in both Cloudflare KV and the Cache API with a 24-hour TTL. Response headers include X-Favicon-Source and X-Cache-Layer for debugging.
Fallback & errors
If no favicon is found, the service redirects to a configurable ?default-avatar or the BlueAT default icon. Use ?throw-error-on-404=true to receive a hard 404 instead.
response headers
X-Favicon-Source
Where the favicon was found: google-s2-128, google-s2-32, favicon.ico, or the full URL of the HTML-parsed icon.
X-Cache-Layer
Which cache layer served the response: pop (local edge), kv (global KV), or the fetch source on a miss.
Cache-Control
All responses include public, max-age=86400, s-maxage=86400 — 24 hours at both browser and CDN edge.