【发布时间】: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