[FEATURE] Sort FaviconURL
by size based on metadata without downloading image data
#91
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This feature introduces the ability to sort FaviconURL entries by their inferred size, based on the metadata (
sizeTag
) provided in the HTML or web application manifest files. Importantly, this process occurs without downloading the favicon images, allowing for improved performance when selecting the largest or smallest favicon available.Sorting by Size Without Downloading
• New methods
largest()
andsmallest()
allow users to sort favicons by size based on thesizeTag
metadata, without downloading the images first.• This enables more efficient selection of favicons, especially in cases where downloading all images would incur unnecessary overhead.
Metadata-Based Sorting
• Sorting relies on the
sizeTag
attribute, which indicates the size of the favicon in the HTML or manifest.• If the
sizeTag
is not correctly provided or missing, the feature will fall back to default handling.Limitations
• Sorting accuracy depends on the presence and correctness of the sizeTag metadata. If metadata is incorrect or missing, the actual image size may differ from what’s indicated.
• This feature is most useful when the source provides accurate metadata for favicon dimensions.
Usage