3 ms·
No it’s not: the root <svg> element must exist in the http://www.w3.org/2000/svg http://www.w3.org/2000/svg namespace, or the file won’t be valid SVG and won’t
by chrismorgan 5y ago
No it’s not: the root <svg> element must exist in the http://www.w3.org/2000/svg http://www.w3.org/2000/svg namespace, or the file won’t be valid SVG and won’t be rendered.
Alas for my beautiful short form that won’t work after all:
<link rel=icon href=data:image/svg+xml,<svg/%3E>
I’ll just have to settle for this:
<link rel=icon href="data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg'/>">
Note, however, that by making it a valid SVG file, the browser will render an empty favicon, rather than saying “this page has no favicon” and either leaving the space out or putting some default icon in instead. Consequently, `data:,` is almost certainly preferable.
(If you’re not sure why I worded the namespaces remark so rather than just talking about an xmlns attribute, here’s some valid SVG: <foo:svg xmlns:foo="http://www.w3.org/2000/svg"/> http://www.w3.org/2000/svg"/>.)