Pro@programming.dev to Programming@programming.devEnglish · 4 days agoDid you know that Google provides a free API to retrieve the favicon for any website?programming.devimagemessage-square20linkfedilinkarrow-up114arrow-down140
arrow-up1-26arrow-down1imageDid you know that Google provides a free API to retrieve the favicon for any website?programming.devPro@programming.dev to Programming@programming.devEnglish · 4 days agomessage-square20linkfedilink
minus-squareargv minus one@mastodon.sdf.orglinkfedilinkarrow-up12·4 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-up7·4 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.