7

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 !

6

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

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

|improve this answer|||||
1

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.

|improve this answer|||||

Your Answer

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