简体   繁体   English

加载不正确的apple-touch-icon

[英]Incorrect apple-touch-icon is being loading

This code, put in the head element, loads the 120px icon on my iPhone 6 Plus when I go to add the site to the home screen, even though the Apple documentation says that shouldn't be the case. 当我将站点添加到主屏幕时,此代码放在head元素中,将120px图标加载到我的iPhone 6 Plus上,即使Apple文档说并非如此。

<link rel="apple-touch-icon" sizes="120x120" href="img/icon-120.png">
<link rel="apple-touch-icon" sizes="180x180" href="img/icon-180.png">

Thoughts? 思考?

This is either a bug of iOS or a bug in Apple specs, but in any case this is not normal. 这可能是iOS的错误,也可能是Apple规格的错误,但是无论如何这都不正常。

This issue was discussed as an issue of the html5-boilerplate project and also documented in RealFaviconGenerator compatibility page (full disclosure: I'm the author of this site). 该问题作为html5-boilerplate项目的一个问题进行了讨论,并记录在RealFaviconGenerator兼容性页面中 (完整披露:我是此站点的作者)。 The bottom line: 底线:

  • Despite of the specs, the iPhone 6 / iOS 8 does not use the 180x180 icon for the home screen, but the 120x120 icon. 尽管有规格说明,iPhone 6 / iOS 8并不将180x180图标用于主屏幕,而是使用120x120图标。 This is what you observe. 这就是您观察到的。
  • The 180x180 icon is used in two situations: when a bookmark is created on an iPhone 6 / iOS 8 (so the iPhone 6 does use this icon after all) and for add to home screen on an iPad 3rd generation / iOS 8 (so some iOS devices do use this icon for home screen). 在两种情况下使用180x180图标:在iPhone 6 / iOS 8上创建书签时(因此iPhone 6毕竟会使用此图标),以及在iPad第三代/ iOS 8上添加到主屏幕时(因此有些iOS设备会将此图标用于主屏幕)。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM