1
所以我有這個簡單的HTML文件使用蘋果移動網絡應用能力和cache.manifest問題
<!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瀏覽器,它不緩存在這個保存的應用程序。任何人都知道如何解決這個問題?