Question

I'm planning to create a cross-browser web site that does not use images(.jpg, .png, .svg, etc.) for modern browsers. Is it possible to replace favicon.ico with a @font-face?

Was it helpful?

Solution

The favicon is an image resource, not text, so it cannot be replaced with an icon font using @font-face.

If you absolutely do not want to use an image file, you can always create the favicon in an image editor, then serialize the file into a data URI:

<link rel="shortcut icon" href="data:image/x-icon;base64,...">

OTHER TIPS

No, you have to use an image. Sorry

You have to definitely use an image. But if you need a quick favicon made of some text and a background try http://antifavicon.com/

The answer is NO

Also it's not necessary to provide <Link> tag for your favicon.

Providing base64 data is much heavier. Instead, simply copy favicon.ico file to your webroot (public_html), server will automatically send this file as a favicon faster than any method.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top