質問

I'm trying to make a web-app viewable when offline.

  • My index.html references the manifest like so: <!DOCTYPE html manifest="manifest.appcache">
  • The MIME type is correct: my .htaccess has AddType text/cache-manifest .appcache

This is what manifest.appcache looks like:

CACHE MANIFEST
# 2012-09-28:v1

CACHE:
style.css
images/logo.png

However, nothing is cached.

When I call applicationCache.status in a javascript console, it returns 0 (I think it should return 1 if successful).
In Chrome, viewing chrome://appcache-internals/ also reveals that there are no application caches.

What am I doing wrong?

役に立ちましたか?

解決

Well, that was stupid. Here's what I was doing wrong:

<!DOCTYPE html manifest="manifest.appcache">

Should've been:

<!DOCTYPE html>
<html manifest="manifest.appcache">
ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top