What does it mean when the apple-touch-icon.png was requested

荒凉一梦 提交于 2019-12-18 09:39:01

问题


I know what the apple touch icon is, and I have seen an apple desktop before, so I can imagine what it would look like. I also know how to add an apple touch icon to my site.

But here's the burning question: I keep getting (failed) requests for this touch icon... So what does that mean?

Was an apple user simply accessing the site? Were they bookmarking it?

What is the action from an apple machine that triggers the request for the touch icon?


回答1:


When somebody using an iOS device visits your web-page and decides to "bookmark" your page by addding your page to their Home screen the apple touch icon is used. It is like a favicon for browsers but has higher resolution and "might be designed" to match app icons ...




回答2:


Many log investigate to find that: whatever you have specified paths to apple-touch-icon files in the <head>, Safari will search these files at the domain's root when you add a bookmark/home screen shortcut:

/apple-touch-icon.png
/apple-touch-icon-120x120-precomposed.png
/apple-touch-icon-120x120.png
/apple-touch-icon.png

Yes, 2 times the same file (tried on an iPhone 6).




回答3:


to avoid 404 error on NGINX

  • create an empty image file (blank.gif)
  • put it into images directory
  • use following configuration:

Location ~* /apple.*.png$ { rewrite ^.+$ /images/blank.gif last }



来源:https://stackoverflow.com/questions/17385086/what-does-it-mean-when-the-apple-touch-icon-png-was-requested

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!