Why would you ever want to route your request like this through a third party especially an ad company? To get the favicon of a site you just request www.example.com/favicon.ico.
@[email protected]@[email protected]@[email protected]
AFAIK there’s also a special file name Safari uses for bigger PNG icons. That Google thing probably just facilitates all this machinery, but I agree — I wouldn’t rely on Google for such things myself.
True. I’ve just seen requests to that file in my demo env for web apps I have and I’ve seen my browser request that file by itself when running those locally.
/favicon.ico is the only “default” URL. /favicon.ico is usually not an actual “icon” type anymore but PNG or JPG (but with the same URL). Other than that you need to load the HTML and check for Link headers or <linkrel=icon> elements. While URLs like /favicon.png may be popular they aren’t part of any actual protocol.
Why would you ever want to route your request like this through a third party especially an ad company? To get the favicon of a site you just request
www.example.com/favicon.ico
.@FrostyPolicy
Not necessarily. You need to fetch the HTML of the web page you want the icon for and see if there’s a <link rel=icon> or equivalent HTTP header.
And yes, this means different pages on the same site can have different icons.
@Pro
@[email protected] @[email protected] @[email protected]
AFAIK there’s also a special file name Safari uses for bigger PNG icons. That Google thing probably just facilitates all this machinery, but I agree — I wouldn’t rely on Google for such things myself.
It doesn’t have to be an
*.ico
file. So you might need to try different file extensions.True. I’ve just seen requests to that file in my demo env for web apps I have and I’ve seen my browser request that file by itself when running those locally.
/favicon.ico
is the only “default” URL./favicon.ico
is usually not an actual “icon” type anymore but PNG or JPG (but with the same URL). Other than that you need to load the HTML and check forLink
headers or<link rel=icon>
elements. While URLs like/favicon.png
may be popular they aren’t part of any actual protocol.