apple-touch-icon 404 errors in logs

Curious about several peculiar Apple related 404 errors for images in my web server logs, I decided to find what is going on, and became knowledgeable about yet another nugget that I really didn’t want to know. (sigh)

The puzzle was these log lines frequently coming up in my web server access logs.

...
GET /apple-touch-icon-precomposed.png HTTP/1.1" 404
GET /apple-touch-icon.png HTTP/1.1" 404
GET /apple-touch-icon-precomposed.png HTTP/1.1" 404
GET /apple-touch-icon.png HTTP/1.1" 404
GET /apple-touch-icon-precomposed.png HTTP/1.1" 404
GET /apple-touch-icon.png HTTP/1.1" 404
GET /apple-touch-icon-precomposed.png HTTP/1.1" 404
GET /apple-touch-icon.png HTTP/1.1" 404
GET /apple-touch-icon-precomposed.png HTTP/1.1" 404
GET /apple-touch-icon-precomposed.png HTTP/1.1" 404
GET /apple-touch-icon-114x114-precomposed.png HTTP/1.1" 404
GET /apple-touch-icon-114x114.png HTTP/1.1" 404
GET /apple-touch-icon-precomposed.png HTTP/1.1" 404
GET /apple-touch-icon.png HTTP/1.1" 404
...

I first thought that I got something in my web site theme wrong, and grepped everywhere but could not spot this URL anywhere. When it didn’t turn up anything, I searched on the web for a bit and this is what I found out.

These queries are sent out by mostly Apple devices, and maybe some Android ones too, just to be compatible.

These URLs are the equivalent of favicons in Apple’s world. So instead of implementing the standard favicon definition using “link” tags, Apple apparently implemented their own convention.

So, if you have OCD about these matters (404s in logs) like me, and really lazy on the other hand (the Apple standards will require you to create several versions of these icons) you should create a 144x144 PNG file with your favicon and place it in the root of your website with both these names - apple-touch-icon.png and apple-touch-icon-precomposed.png. That will show them Apples. Heh. Umm. I will end here.

References:

  1. Stackoverflow: Why am I getting error for apple-touch-icon-precomposed.png
  2. Ghacks: Why Webmasters Should Analyze Their 404 Error Log
  3. Mathias Bynens: Everything you always wanted to know about touch icons
  4. Apple’s guidelines on creating “web clips”
tech
Use of Tor will make you interesting to NSA A security vulnerability in the toilet