【问题标题】:using apple-mobile-web-app-capable and cache.manifest issue使用 apple-mobile-web-app-capable 和 cache.manifest 问题
【发布时间】:2012-11-16 02:41:14
【问题描述】:

所以我有这个简单的 html 文件

<!DOCTYPE HTML>
<html manifest="cache.manifest"><head>
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="black">
<title>Test</title>
<meta http-equiv="content-type" content="text/html">
<meta name="HandheldFriendly" content="true">
<meta name="viewport" content="width=320; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;">

<body marginwidth="0" marginheight="0" topmargin="0" leftmargin="0">
    <h1>hello</h1>
</body>
</html>

我的 cache.manifest 很简单

CACHE MANIFEST

我在本地服务器 (localhost) 上运行这个网站。我从 iphone safari 加载它,它工作正常。然后我停止服务器并再次加载它,它可以工作,因为离线缓存正在完成它的工作。但是...如果我将网站保存为 iphone 仪表板中的开始图标,然后我尝试在服务器停止的情况下打开它,它将无法加载。但是...如果我在服务器至少运行一次的情况下打开它(它会工作),那么我以后可以毫无问题地打开它。

看起来即使该页面已在 safari 中缓存,但它并未缓存在此保存的应用程序中。有人知道如何解决这个问题吗?

【问题讨论】:

    标签: iphone caching safari iphone-standalone-web-app


    【解决方案1】:

    这是因为 Safari 使用的缓存与 WebClip 不同。在 Safari 中缓存的事实并不意味着如果您从中创建 webClip,它将被缓存。您需要至少访问一次网络剪辑以将其缓存。

    【讨论】:

      猜你喜欢
      • 2012-03-08
      • 1970-01-01
      • 2017-01-03
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2011-12-06
      • 2011-06-04
      • 1970-01-01
      相关资源
      最近更新 更多