1

I am working on a browser WebExtension, one feature of my extension is to get the icon image and name of the website which user is browsing. I found some ways to get the icon, e.g

  1. https://<some domain>/favicon.ico
  2. link and metadata in header, such as <meta property="og:image" content="<some image link>" />, <link rel="apple-touch-icon" href="<some image link>".

As for the website name, I can use

  1. document.title
  2. metadata in header, such as <meta name="application-name" content="some name">
  3. the second level domain name

However, that is still not enough, I found the result is not satisfying on quite a lot websites.

I am wondering is there some list of those heuristics or routines to cover most of the cases.

Or is there any advice or better approach to get the site's logo/icon and name?

Thank you

wOxxOm
  • 65,848
  • 11
  • 132
  • 136
thusimon
  • 133
  • 1
  • 1
  • 9

0 Answers0