我在我的HTML 5声明中添加了一些设置,这在Google和
iOS上的Safari和iOS上的Safari作为网页剪辑。
不幸的是,在IE和Fire中加载清单文件时,相同的代码会导致中止。
下面是我们应用的设置:
服务器端:IIS7,Windows 2008 R2。响应:文本/缓存-清单,无缓存。
清单的文本是:
CACHE MANIFEST
CACHE:
/
/Index.html
/Login.html
/favicon.ico
/Content/Kendo/web/Font/FontAwesome.otf
NETWORK:
*这是为第一个文件提供的结果
URL: http://192.168.0.220:1009/
Method:
Result: (Aborted)
Type: text/html
Received: 292 B
Taken: < 1 ms
Initiator: (Pending...)以下是我们的回应:
Key Value
Response HTTP/1.1 200 OK
Cache-Control no-cache, no-store
Pragma no-cache
Content-Type text/html
Expires -1
Last-Modified Mon, 23 Sep 2013 16:05:06 GMT
Accept-Ranges bytes
ETag "351169ab76b8ce1:0"
Server Microsoft-IIS/7.5
X-Powered-By ASP.NET
Date Mon, 23 Sep 2013 16:32:43 GMT这是html 5清单的错误消息:
Resource doesn’t exist on the server: 'http://192.168.0.220:1009/'.
AppCache Fatal Error最后,我在Index.html页面上有了这些元标记:
<meta name="apple-mobile-web-app-capable" content="yes" />
<meta name="apple-mobile-web-app-status-bar-style" content="black" />
<meta http-equiv="CACHE-CONTROL" content="NO-CACHE" />
<meta http-equiv="EXPIRES" content="0" />
<meta http-equiv="PRAGMA" content="NO-CACHE" />任何帮助都非常感谢。
发布于 2013-09-24 08:15:27
我找到了问题的原因。
在Request_End In ASP.NET Global.asax中,我们应该应用
HttpContext.Current.Response.Cache.SetNoStore();只适用于iOS,而chrome始终有效,既可用于更新应用程序,也可用于脱机使用。
注意:在iOS的网页剪辑和safari中不需要存储,因为在更新清单之前已经加载了文件,否则它们将不会被更新,即使清单下载了新版本的文件。
希望这对你也有帮助。
https://stackoverflow.com/questions/18964638
复制相似问题