Comment by fayazara

1 year ago

This is so awesome! I noticed the favicon too changes to the current emoji (nice little detail)

Yes, and I've not seen this before, the HTML uses an SVG with an emoji in it as the favicon:

    <link rel="icon" href="data:image/svg+xml,<svg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 100 100%22>
      <text y=%22.9em%22 font-size=%2290%22>
        :( HN has remove the emoji
      </text>
    </svg>">

Very neat. Might use that.

  • I'm just learning JS and P5.play - possibly a daft question why is using SVG useful over say just an emoji/text?

    • It's interesting (to me) in this specific example because it generates a favicon using SVG + emoji. I wasn't aware that could be done. Favicons can't be simple enoji/text, they have to be an image.

      2 replies →

That’s what I do on my site! It is (AFAIK) the only way to get platform-specific, dynamic emojis as the favicon.