Skip to content

Favicons Recommended #3

Description

@indcoder
  • SVG Favicon
  • Favicon ico
  • Apple touch icon
  • PWA manifest

For modern web development (as of April 2025), the recommended approach is to use SVG as your primary favicon format due to its scalability, smaller file size, and flexibility (like dark mode support).

However, because universal compatibility is still important, the best practice is to:

  1. Provide an SVG favicon for modern browsers.
  2. Provide an ICO favicon as a fallback for older browsers and certain specific contexts (like some bookmarking tools or older operating system shortcuts).
  3. (Optional but Recommended) Provide a PNG version specifically for apple-touch-icon and potentially a manifest.json for PWAs which might also reference PNG icons.

How to Implement (Example HTML in <head>):

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

<link rel="alternate icon" href="/favicon.ico" type="image/x-icon">

<link rel="apple-touch-icon" href="/apple-touch-icon.png">

<link rel="manifest" href="/site.webmanifest">

By declaring the SVG first (rel="icon"), modern browsers that support it will use it. Browsers that don't understand image/svg+xml or prefer alternate icon will fall back to the .ico file.

In summary: Prioritize SVG for its modern benefits, but include an ICO for maximum compatibility.

Metadata

Metadata

Assignees

Labels

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions