【发布时间】:2011-11-14 14:05:29
【问题描述】:
我正在尝试为网站设置缓存清单,但运气不佳。演示页面在这里:http://www.matthewlehner.ca
我使用的 HTML 有这样的结构:
<!DOCTYPE html>
<html manifest="manifest.appcache">
</html>
根文件夹中的.htaccess 有以下条目:
AddType text/cache-manifest appcache
AddType text/cache-manifest .appcache
来自`curl -I http://www.matthewlehner.ca/manifest.appcache'的回应
HTTP/1.1 200 OK
Date: Sun, 11 Sep 2011 00:04:30 GMT
Server: Apache
Last-Modified: Sat, 10 Sep 2011 07:53:30 GMT
ETag: "18a84003-32-4ac9196f95280"
Accept-Ranges: bytes
Content-Length: 50
Content-Type: text/cache-manifest
但 OS X 10.6 上的 Chrome 开发人员报告以下错误:
Application Cache Error event: Invalid manifest mime type (text/plain) http://www.matthewlehner.ca/manifest.appcache
显然情况并非如此,但我该如何解决呢?是 Chrome、.htaccess 还是托管问题?
【问题讨论】:
-
你给我的链接对我有用...
-
应用程序缓存清单有效吗?
-
是的!文档是从应用程序缓存加载的,清单 matthewlehner.ca/manifest.appcache 应用程序缓存检查事件 应用程序缓存 NoUpdate 事件 这是在第二次加载之后。
-
您使用的是什么浏览器/操作系统?也许这是我的 Chrome 的缓存问题。
-
Fedora 15 上的 Google Chrome 13.0.782.215。
标签: html .htaccess mime-types offline-caching application-cache