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 “” , but if i go to google images, the url is “” 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