Problem
When navigating to localhost URLs, the browser unnecessarily attempts to fetch favicons from DuckDuckGo's favicon API:
DBG fetching favicon from DuckDuckGo url=https://icons.duckduckgo.com/ip3/localhost%3A5173.ico
This is wasteful since:
- DuckDuckGo cannot return a favicon for localhost
- It adds unnecessary network latency
- It may cause timeout delays
Proposed Solution
Add a check in internal/infrastructure/favicon/fetcher.go at the start of the Fetch() function to skip fetching for local domains:
localhost
127.0.0.1
::1
- Optionally:
*.local, 192.168.*, 10.*, 172.16-31.* (private IP ranges)
Implementation Hint
func isLocalDomain(domain string) bool {
// Check for localhost variants and private IPs
// Return true to skip external fetch
}
Add the check around line 39-41 in fetcher.go, before the DuckDuckGo request is made.
Files to Modify
internal/infrastructure/favicon/fetcher.go
Acceptance Criteria
Problem
When navigating to localhost URLs, the browser unnecessarily attempts to fetch favicons from DuckDuckGo's favicon API:
This is wasteful since:
Proposed Solution
Add a check in
internal/infrastructure/favicon/fetcher.goat the start of theFetch()function to skip fetching for local domains:localhost127.0.0.1::1*.local,192.168.*,10.*,172.16-31.*(private IP ranges)Implementation Hint
Add the check around line 39-41 in
fetcher.go, before the DuckDuckGo request is made.Files to Modify
internal/infrastructure/favicon/fetcher.goAcceptance Criteria
localhostURLs127.0.0.1URLs::1URLs