Closed mateuszwilczek closed 11 months ago
I found this link to a blog-post Definitive edition of "How to Favicon in 2021" linked from caniuse-com PNG favicons
It talks about the "mess" which has to be considered using favicons.
There is one more thing that we have to consider. The TW favicon.ico is a tiddler, that is defined dynamically at startup
So technically there is no real need for a favicon file on a server. The html file will have a default one.
Edit: There seems to be a need. So we should have one
I think the favicon functionality has been developed to a state that works OKish and has never been touched since. May be except to fix major browser changes that broke something.
Just so it's clear, my intention was to change the files used in tiddlywiki.com and co., to give a better example on how to use favicons in TW, and to show that a PNG is usually a good solution, and that the "strage" ICO format is not necessary. In any case, I think https://tiddlywiki.com/#Setting%20a%20favicon should contain a little more information on the supported formats, I'll work on that when the issue at hand will be settled.
I did not mean that there need to be changes to the core about how it handles favicons. I agree that the current functionality of $:/favicon.ico
is sufficient. And if someone would really want to address "the browser support mess" using many favicon files, then I guess it would be possible with raw markup.
In the OP you wrote we may be able to decrease the html file size by about 90kB. If so, we should do that. We only need to make sure, that our build process also knows about that.
Is your feature request related to a problem? Please describe. The favicons used on tiddlywiki.com and related sites (prerelease, dev, upgrader, links), implemented using tiddler
$:/favicon.ico
, are in uncompressed ICO format. This causes them to be bloated and causes minor compatibility issues. The ICOs contain an inconsistent amount of embedded sizes:I have looked at the files located here in this repo.
Describe the solution you'd like Use PNG favicons instead. This format has support on all major browsers, superseeding that of ICO or SVG. I suggest 192x192 size, but see additional context below.
Describe alternatives you've considered
Additional context The favicon support on different browsers and platforms is a mess. Ideal representation on all browsers/platforms requires a couple of files in various formats and accompanying declarations/manifest. This is neither achievable using only
$:/favicon.ico
mechanism, nor really necessary IMO.In our case, I think PNG is the best compromise:
From what I have read, the 192x192 size seems to be the largest one widely used by various browsers. A PNG of these dimensions would still weigh much less than the current uncompressed ICO.
I'm ready to help in creating the proposed PNG favicons. I have created an issue instead of PR, because:
$:/favicon.ico
to tiddlywiki-com branch?).Edit: I know it's a low priority issue, but it's easy to solve, and I think tiddlywiki.com should give a good example.