Re:Show HN: Emojicons
by spicybright on Saturday April 24, 2021 @07:59AM
(#26924256)
Surely this seems too hacky to be of real use?
Re:Show HN: Emojicons
by shadowfaxRodeo on Sunday April 25, 2021 @04:00AM
(#26931102)
Which element is hacky?
The inlined icon feels hacky maybe. Inlining very small files is a good idea I think though. Sending an entire request for only 108 bytes is a bit wasteful.
I've been doing some tests with Emoji / SVG favicons.
There's a couple of problems. They don't show up on some old browsers and in google search results.
For old browsers there's a solution, which is to have a raster .ico version of the icon at the root of the domain: e.g. example.com/favicon.ico
But for the google issue, I'm not sure if that's the solution. Whatever google is using to render svg icons in their search results just doesn't like emojis. I haven't tested that yet.
also as others have pointed out there's this bit of code that can save you an http request:
<link rel="icon" href="data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 99 99'><text y='.9em' font-size='90'>EMOJI</text></svg>">