1

I have different icons for the ipad, iphone and other devices.

Is it possible to make reference to all of them with an external file? or do I need to paste all of these links in the head section for each page?

<link rel="apple-touch-icon" href="img/apple-touch-icon-iphone.png">
<link rel="apple-touch-icon" sizes="72x72" href="img/apple-touch-icon-ipad.png">
<link rel="apple-touch-icon" sizes="114x114" href="img/apple-touch-icon-iphone-retina-display.png">
<link rel="shortcut icon" href="img/favicon.ico">
Mogsdad
  • 44,709
  • 21
  • 151
  • 275
Erik
  • 5,701
  • 27
  • 70
  • 119

1 Answers1

0

You don't have to declare the Apple touch icons in every pages. There is no "external file" technique, but Apple defines both declarations and file naming conventions. You can use the conventions to avoid extra HTML code.

To do this:

  • Remove the three link markups which declare the Apple touch icons.
  • Place your icons in the root directory (ie. /) of your web site.
  • Rename your icons according to Apple specs: apple-touch-icon-72x72.png, apple-touch-icon-114x114.png, etc.

iOS devices will still be able to find them. A note of warning with this practice: this is okay for iOS devices. But some other platforms, such as Android, also use these icons. And these platforms may fail at using the conventions define by Apple (declarations support is more widespread).

Another note about the icons size: 72x72 and 114x114 are for iOS 6 and prior. Make sure you define Apple touch icons with the right sizes.

Community
  • 1
  • 1
philippe_b
  • 38,730
  • 7
  • 57
  • 59