How to get favicon’s URL from a generic webpage in Javascript? [closed]

For people still not getting the favicon with above codes;

  1. Most browsers support getting the favicon by sending a request (/favicon.ico) themselves, instead of in the html.

  2. Another solution is provided by Google.

    To get the favicon for a domain, use:
    https://s2.googleusercontent.com/s2/favicons?domain=www.stackoverflow.com

    To get the favicon for an URL, use:
    https://s2.googleusercontent.com/s2/favicons?domain_url=https://www.stackoverflow.com

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)