Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Do apple-touch-icons need to use the 'standard' filename convention or can I call them whatever I like?

Tags:

html

ios

By 'standard' filename conventions, I mean:

  • apple-touch-icon.png
  • apple-touch-icon-72x72.png
  • apple-touch-icon-114x114.png
  • apple-touch-icon-144x144.png

I know that it is possible to omit the reference to these icons in the HTML and iOS will automatically search the root directory for files with these filenames.

But, assuming I am going to include a reference to these icons in the HTML, is it allowed to use different filenames for the icon image files? For example:

  • my-touch-icon-114x114.png
  • 123456-114x114.png
  • some-unique-id-114x114.png

So in my HTML it would look something like this:

<link rel="apple-touch-icon" href="path/to/icons/some-unique-id.png">
<link rel="apple-touch-icon" sizes="72x72" href="path/to/icons/some-unique-id-72x72.png">
<link rel="apple-touch-icon" sizes="114x114" href="path/to/icons/some-unique-id-114x114.png">
<link rel="apple-touch-icon" sizes="144x144" href="path/to/icons/some-unique-id-144x144.png">

The reason I ask is that I need to use different icons for different sections/pages of my site and I'd like to store all the icons in a single directory. Obviously I can't store multiple versions of each icon all with the same filename.

like image 973
Pete H Avatar asked Sep 15 '12 12:09

Pete H


1 Answers

Yes, if you use <link> tags to link to your icon files correctly, then iOS should still be able to find them and you won't have to follow the standard naming convention.

like image 136
BoltClock Avatar answered Oct 24 '22 15:10

BoltClock