Most modern browsers support .svg favicons as of Sep 2020. See: https://caniuse.com/link-icon-svg
However, in order to support legacy browsers my site serves a .ico favicon in addition to a .svg favicon with the following html links in <head>
:
<link rel="icon" type="image/x-icon" href="images/favicon.ico">
<link rel="icon" type="image/svg+xml" href="images/favicon.svg">
This works as expected where browsers that support .svg favicons appropriately use the .svg favicon while browsers that do not use the .ico favicon. What I don't understand is why browsers that do support .svg favicons (like Chrome) also request the .ico favicon? See the Chrome waterfall below:
If Chrome has already successfully downloaded the .svg favicon why does it go on to request the .ico favicon as well? Shouldn't Chrome intelligently select only one favicon type to load without forcing the client to download unnecessary resources? Is there a way to instruct Chrome to only download the .svg favicon?
favicon.ico
completely. Browsers know to request it if they want it, even if you don't link to it. Therefore, I'm guessing that if the browser can't handle your link to the SVG, it will be requesting the ICO anyway. – Hydranth