From a post on http://diveintohtml5.org/offline.html (Wayback Machine Copy)

Your cache manifest file can be located anywhere on your web server, but it must be served with the content type text/cache-manifest. If you are running an Apache-based web server, you can probably just put an AddType directive in the .htaccess file at the root of your web directory:

AddType text/cache-manifest .manifest

Where do I create the file .htaccess?

Need some more setup with apachectl ?

Thanks very much !


Typically, in the root directory of your application, you'll have 3 files:

  • index.html (<html manifest="app.manifest">...</html>).
    This can also be auto-generated with a server-side language such as php, jsp, Ruby ...
  • app.manifest (CACHE MANIFEST ...)
  • .htaccess (AddType text/cache-manifest .manifest)

you can add .htaccess in any directory and the .htaccess in the child directory will enjoy the precidence over .htaccess in the parent directory.


That will depend on your server, if your APC server has a cpanel named mime type section, you can click it and add this mime type manually at that section. if your server only has .htaccess, normally you need edit the file and add it manually online or edit it yourself,then save it, then let the server side clear the cache,then it will works fine.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy