Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I retrieve the favicon of a website with XSLT or JSP?

I want to list featured websites on my website and I thought it would be cool to honor and use their favicon. How do I get it from the domain for an arbitrary URL in either JSP or XSLT? I can fire off PHP or javascript, but XSLT is the preferred methodology.

like image 849
mobibob Avatar asked Jan 02 '10 03:01

mobibob


People also ask

How do I import a favicon?

To add a favicon to your website, either save your favicon image to the root directory of your webserver, or create a folder in the root directory called images, and save your favicon image in this folder. A common name for a favicon image is "favicon.ico".

Do all websites have a favicon displayed in the URL?

From Internet Explorer to Google's SERP Nowadays, favicons are displayed right above the address bar regardless of whether the website is bookmarked or not. And in the small chance that a website doesn't have a favicon, the browser will display a generic browser symbol.


1 Answers

you could also simply do this

http://s2.googleusercontent.com/s2/favicons?domain_url=http://domain.com

like image 166
nLL Avatar answered Sep 28 '22 23:09

nLL