views:

56

answers:

1

I've been writing a simple text-editor in HTML5 that is supposed to work offline. I can't, however, get the offline application cache to work, and I can't work out why not.

My manifest file is like this:

CACHE MANIFEST
application.html
options.html
...

And it is being invoked as follows:

<!DOCTYPE html> 
<html manifest="cache.manifest"> 
<head>
...

I'm using Google App Engine to host the web application.

I've put the webpage through the W3C HTML validator (http://validator.w3.org/check?uri=https%3A%2F%2Fwrite-space.appspot.com%2F) and it comes out fine.

I've tested it in Chrome and Firefox. In Chrome nothing is added to the cache storage (and window.applicationCache.status returns 0). In Firefox the notification bar asking to cache the files does not appear. Basically, the files are not being cached.

I've looked at various demos that do cache for offline viewing, and cannot work out why my code does not work.

Can anyone help?

A: 

You have to add a MIME type to .manifest:

.manifest using text/cache-manifest

In .htaccess:

AddType text/cache-manifest .manifest

dododedodonl
Wouldn't google app engine have done that?
Hans
Dunno... Maybe not ;) But that is the most common error in these cases, so, most of the time this works ;)
dododedodonl