我有 4 个支持 webapp 的网络应用程序,每个应用程序在同一个域上都有不同的 URL。当我在 iOS 7 iPad 上为所有 4 个设置主屏幕图标时,图标开始交换并在我设置它们时相互混淆。为了更清楚,这里是第 1 页的代码。
<html>
<head>
<title>Test 1</title>
<meta charset="UTF-8">
<link rel="apple-touch-icon" sizes="72x72" href="/images/iconPurple72.png" />
<!-- iPad - landscape (748x1024) -->
<link rel="apple-touch-startup-image" href="images/ipadLandscape7.png" media="screen and (min-device-width: 481px) and (max-device-width: 1024px) and (orientation:landscape)" />
<!-- iPad - portrait (768x1004) -->
<link rel="apple-touch-startup-image" href="images/ipadPortrait7.png" media="screen and (min-device-width: 481px) and (max-device-width: 1024px) and (orientation:portrait)" />
<!-- iPhone - (320x460) -->
<link rel="apple-touch-startup-image" href="/images/startup7.png" media="screen and (min-device-width: 200px) and (max-device-width: 320px) and (orientation:portrait)" />
<!-- enable full-screen mode -->
<meta name="apple-mobile-web-app-capable" content="yes" />
<!-- controls the appearance of the status bar in full-screen mode -->
<meta name="apple-mobile-web-app-status-bar-style" content="black" />
<meta name = "viewport" content = "width = device-width,initial-scale = 1.0, user-scalable = yes"/>
</head>
<body>
<div><h1>this is test 1</h2></div>
</body>
</html>
..pages 2,3 和 4 完全相同,除了这一行:
<link rel="apple-touch-icon" sizes="72x72" href="/images/iconPurple72.png" />
...每个页面指向同一目录中的不同图像
行为不一致,但可以在设备和模拟器上看到。当 ipad 重新启动时,图标会正常显示,就像它们最初设置的那样。有时,在重新启动之前,点击设置另一个页面后更改的图标可能会导致 iPad 锁定。
有任何想法吗?