Skip to content

Instantly share code, notes, and snippets.

@ngsctt
Created January 14, 2016 07:27
Show Gist options
  • Save ngsctt/3b2b7cc4d5f2be2eb061 to your computer and use it in GitHub Desktop.
Save ngsctt/3b2b7cc4d5f2be2eb061 to your computer and use it in GitHub Desktop.
Which favicon sizes/files to use for maximum compatiblity

Favicon list

Working out what sizes/formats/filenames to use for favicons is confusing---especially if you're trying to support legacy browsers. There are some great lists out there, but they are often out-of-date or incomplete. So here's a new one:

Normal favicons

Place favicon.ico in root directory---include a 16x16 and 32x32 image. This will be effective for most browsers. Do not add a link to the head---browsers that can use png icons may ignore them in favour of the lower-quality ico if you do. favicon.png as a 32x32 icon for browsers that can handle png.

Touch icons

Icons for use in modern browsers (eg. Safari 8+) and mobile devices.

Complete list

Use this list for the most complete support:

  • For iPhone 6 Plus (with @3× display) running iOS ≥ 7: <link rel="apple-touch-icon-precomposed" sizes="180x180" href="/path/to/favicon-180.png">
  • For iPad Pro (with @2× display) running iOS ≥ 7: <link rel="apple-touch-icon-precomposed" sizes="167x167" href="/path/to/favicon-167.png">
  • For iPad with high-resolution Retina display running iOS ≥ 7: <link rel="apple-touch-icon-precomposed" sizes="152x152" href="/path/to/favicon-152.png">
  • For iPad with high-resolution Retina display running iOS ≤ 6: <link rel="apple-touch-icon-precomposed" sizes="144x144" href="/path/to/favicon-144.png">
  • For iPhone with high-resolution Retina display running iOS ≥ 7: <link rel="apple-touch-icon-precomposed" sizes="120x120" href="/path/to/favicon-120.png">
  • For iPhone with high-resolution Retina display running iOS ≤ 6: <link rel="apple-touch-icon-precomposed" sizes="114x114" href="/path/to/favicon-114.png">
  • For iPad mini and the first- and second-generation iPad (@1× display) on iOS ≥ 7: <link rel="apple-touch-icon-precomposed" sizes="76x76" href="/path/to/favicon-76.png">
  • For first- and second-generation iPad: <link rel="apple-touch-icon-precomposed" sizes="72x72" href="/path/to/favicon-72.png">
  • For non-Retina iPhone, iPod Touch, and Android 2.1+ devices: <link rel="apple-touch-icon-precomposed" sizes="57x57" href="/path/to/favicon-57.png">

Recommended list

Use this list for the currently recommonded sizes as of iOS 9:

  • For iPhone 6 Plus (with @3× display) running iOS ≥ 7: <link rel="apple-touch-icon-precomposed" sizes="180x180" href="/path/to/favicon-180.png">
  • For iPad Pro (with @2× display) running iOS ≥ 7: <link rel="apple-touch-icon-precomposed" sizes="167x167" href="/path/to/favicon-167.png">
  • For iPad with high-resolution Retina display running iOS ≥ 7: <link rel="apple-touch-icon-precomposed" sizes="152x152" href="/path/to/favicon-152.png">
  • For iPhone with high-resolution Retina display running iOS ≥ 7: <link rel="apple-touch-icon-precomposed" sizes="120x120" href="/path/to/favicon-120.png">
  • For iPad mini and the first- and second-generation iPad (@1× display) on iOS ≥ 7: <link rel="apple-touch-icon-precomposed" sizes="76x76" href="/path/to/favicon-76.png">

Fallback icon

Use these to cover any remaining devices that may not support the linked icons. Ideally size them at 180x180 (for maximum usefulness) or 57x57 (for minimal bandwidth use).

Place apple-touch-icon-precomposed.png and apple-touch-icon.png in the root directory for everything else. Include both for maximum compatibility, as iOS 1 and BlackBerry OS6 don’t support precomposed icons, and Android 2.1 only supports precomposed icons.

Metro tile icons

Modern Windows icons

Windows 8/IE 9--10

<meta name="msapplication-TileColor" content="#FFFFFF"> bacground colours of tile---change #FFFFFF to desired colour. <meta name="msapplication-TileImage" content="/path/to/favicon-144.png"> icon image on tile.

Windows 9/IE 11

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment