JavaScript and Favicon

Hello, i need to show the favicon of the WebPage that display the HtmlViewer. Theres a way to take the url of the favicon by JavaScript? Thanks in advance

Since it is usually at the root of the site and has always the name favicon.ico you could get it using an HTTPSocket.

No need for JavaScript.

thanks. Yeas i know, but my idea was take the host url by java script, for example, the favicon of google is “http://www.google.com/favicon.ico” , but if i go to google images, the url is “https://www.google.com.ar/imghp?hl=es-419&tab=wi&ei=WC9OVc_jOcnbsASUtoHYDg&ved=0CA8Qqi4oAg” so i can’t take the favicon. i need to take the url in google images, but without all the text after the “/”. Do You understand it?

(I put google images as example)

It is not a problem in Xojo, where all you got to do is to cut whatever junk comes after the domain name. My post was just to say that you do not need JavaScript to fetch the Favicon.ico file.

For JavaScript, you could have a look at http://stackoverflow.com/questions/2057636/get-websites-favicon-with-js