3 ms·
Wouldn't work in an HTTPS site I assume (due to browser warnings over insecure resources...)?
by rgrieselhuber 14y ago
Wouldn't work in an HTTPS site I assume (due to browser warnings over insecure resources...)?
- philip1209 14y agoI'm sure you could run one of these APIs server-side and avoid the warning (which would not work with CSS, but it would be a work-around).
- rgrieselhuber 14y agoIt looks like this service (mentioned in the post) also supports https, although it is a little slow. http://getfavicon.appspot.com/ http://getfavicon.appspot.com/
- philip1209 14y agoGood find. After my previous comment, I've been dwelling on this more, and I think that some kind of server-side retrieving/caching program for these favicons would both speed up the services significantly and allow https. Favicons don't change too often, and most of the use cases I can think of for this (e.g. blogs) would only require a static image. Of course, the caching would provide the major speed increase by avoiding an API call rather than optimizing delivery of the image.
- Rajiv_N 14y agoFWIW, the google service mentioned in the article works via https as well. [https://www.google.com/s2/u/0/favicons?domain=css-tricks.com https://www.google.com/s2/u/0/favicons?domain=css-tricks.com] I think the best way to handle this would be to remove the scheme from the background url. So it would look like `background: "url(//www.google.com/s2...")`. This would accommodate both schemes.