Bug 136059

Summary: SVG favicon support
Product: WebKit Reporter: Binyamin <7raivis>
Component: SVGAssignee: Nobody <webkit-unassigned>
Status: RESOLVED INVALID    
Severity: Normal CC: 7raivis, anthonyryan1, ap, beidson, brandon, dbates, dholbert, jberlin, krit, mathias, sabouhallawa, sierkb, syoichi, thorton, tomac, zimmermann
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: All   
OS: All   
URL: http://www.w3.org/TR/html5/links.html#attr-link-sizes-any

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.
Comment 7 Sam Sneddon [:gsnedders] 2022-02-10 16:45:34 PST
For the sake of Apple people:

<rdar://5697363>
Comment 8 Sierk Bornemann 2022-02-10 16:56:34 PST
(In reply to Sam Sneddon [:gsnedders] from comment #7)
> For the sake of Apple people:
> 
> <rdar://5697363>

FYI, just for the record: also publicly mirrored on Open Radar as

https://openradar.appspot.com/41057732
Comment 9 Sam Sneddon [:gsnedders] 2022-12-07 08:53:20 PST
*** Bug 248875 has been marked as a duplicate of this bug. ***