Pro@programming.dev to Programming@programming.devEnglish · 10 days agoDid you know that Google provides a free API to retrieve the favicon for any website?imagemessage-square18linkfedilinkarrow-up11arrow-down10
arrow-up11arrow-down1imageDid you know that Google provides a free API to retrieve the favicon for any website?Pro@programming.dev to Programming@programming.devEnglish · 10 days agomessage-square18linkfedilink
minus-squareargv minus one@mastodon.sdf.orglinkfedilinkarrow-up0·10 days ago@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
minus-squarem0xEE@nosh0b10.m0xee.netlinkfedilinkarrow-up0·10 days ago@argv_minus_one@mastodon.sdf.org @FrostyPolicy@suppo.fi @Pro@programming.dev 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.
@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
@argv_minus_one@mastodon.sdf.org @FrostyPolicy@suppo.fi @Pro@programming.dev
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.