Bug 136059 - SVG favicon support
Summary: SVG favicon support
Status: RESOLVED INVALID
Alias: None
Product: WebKit
Classification: Unclassified
Component: SVG (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: Nobody
URL: http://www.w3.org/TR/html5/links.html...
Keywords:
Depends on:
Blocks:
 
Reported: 2014-08-18 21:45 PDT by Binyamin
Modified: 2018-06-11 15:36 PDT (History)
14 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Binyamin 2014-08-18 21:45:26 PDT
Add SVG site icon support

Syntax <link rel=icon href=gnome.svg sizes="any" type="image/svg+xml">
Spec http://www.w3.org/TR/html5/links.html#attr-link-sizes-any
Test-case http://xn--dahlstrm-t4a.net/svg/favicon/favicon.html

Implementation status on other browsers:
* Chrome https://code.google.com/p/chromium/issues/detail?id=294179
* Firefox https://bugzilla.mozilla.org/show_bug.cgi?id=366324
* IE https://connect.microsoft.com/IE/feedback/details/782416/svg-favicon-support
Comment 1 Brady Eidson 2014-08-19 22:28:01 PDT
A few thoughts:
1 - In the current icon database code, there's very little unique to any file format (or image format) that prevents any resource data from being saved to the icon database.  Are you sure that an SVG file is *not* saved to the database today?

2 - In the short-to-midterm future, we're going to be deprecating the icon database altogether and moving away from the WebKit(WebCore) managed database mechanism on disk.  The replacement will be a pure thin client interface up to the embedding application that gives it the url/sizes/type of the proposed icon, asks for a load decision, and delivers the resource data.  In this future, it will truly be format-agnostic and it will be entirely up to the embedding application to manage the fact that it's SVG and to render it at the appropriate resolution.
Comment 2 Brady Eidson 2014-08-19 22:29:05 PDT
(In reply to comment #1)
> A few thoughts:
> ...Are you sure that an SVG file is *not* saved to the database today?

To elaborate on this, in the past we actually successfully stored PDFs as a resolution-agnostic format, for example, and in the Mac port of WebKit at least they would render perfectly fine.
Comment 3 Binyamin 2016-03-28 13:23:18 PDT
WHATWG issue https://github.com/whatwg/html/issues/110
Comment 4 Daniel Holbert 2016-04-12 14:05:35 PDT
The WHATWG issue linked in comment 3 is actually not directly related to this bug.

(This bug is about SVG as a traditional favicon.  That WHATWG issue is about a fancier thing with an svg mask and a color instead of a favicon.)
Comment 5 Sierk Bornemann 2018-06-09 07:16:26 PDT
The SVG format can be preferable to more easily support higher resolutions or larger icons and hence favicons.
There's no reason *not* to use SVG for icons/favicons. SVG scales well for all resolution types and is supported in all browsers back to IE9.
Therefore, please implement full and full-colored SVG favicon support via rel="icon" rather than having it limited for "pinned tabs" only and rather than requiring a rel="mask-icon" attribute.

For instance:
<link rel="icon" href="favicon.svg">
or
<link rel="icon" href="favicon.svg" type="image/svg+xml">

See also:
https://caniuse.com/#feat=link-icon-svg
Comment 6 Brady Eidson 2018-06-11 15:36:19 PDT
(In reply to Sierk Bornemann from comment #5)
> The SVG format can be preferable to more easily support higher resolutions
> or larger icons and hence favicons.
> There's no reason *not* to use SVG for icons/favicons. SVG scales well for
> all resolution types and is supported in all browsers back to IE9.
> Therefore, please implement full and full-colored SVG favicon support via
> rel="icon" rather than having it limited for "pinned tabs" only and rather
> than requiring a rel="mask-icon" attribute.
> 
> For instance:
> <link rel="icon" href="favicon.svg">
> or
> <link rel="icon" href="favicon.svg" type="image/svg+xml">
> 
> See also:
> https://caniuse.com/#feat=link-icon-svg

All of those points are clearly understood.

At this point, however, favicons are no longer a WebKit feature, but rather a Safari feature.

(I alluded to this upcoming change in 2014 https://bugs.webkit.org/show_bug.cgi?id=136059#c1)

So if you're looking for SVG favicon support in Safari, you'll need to file with Apple at developer.apple.com.

If you're looking for them in some other browser, you'll need to file in that browser's bug tracker.