Webmasters Stack Exchange is a question and answer site for pro webmasters. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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 !

share|improve this question

migrated from stackoverflow.com Jun 13 '11 at 12:51

This question came from our site for professional and enthusiast programmers.

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)
share|improve this answer

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

share|improve this answer

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.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.