I am creating HTML 5 offline application example.
I choose manifest file like this :
<html manifest="Configuration/WMP.manifest">
and manifest file is like this :
CACHE MANIFEST
# Build 2012-02-03
CACHE:
source/styles/examples-offline.css
source/styles/examples.css
source/js/Custom.js
source/js/jquery.min.js
source/js/people.js
source/index.html
NETWORK:
http://*
https://*
- Done correctly ?
- How do I check that sample works right in my local system ?
- I read that a manifest file must be served with the mime-type text/cache-manifest. where should I set this mime-type for manifest file ? I use basic HTML file and I don’t use IIS or Apache webserver
This is incorrect:
This would try to match the exact URL
http://*, which is an invalid URL.You can only use the
*character as a wildcard when it’s on its own line. For example, this would match any resource that hasn’t been explicitly listed under theCACHEorFALLBACKdirectives:Make sure you’re serving the file with the
text/cache-manifestcontent type. This used to be explicitly required by the specification, and current browsers have it implemented that way.Then what do you use to serve up the file? Are you reading it locally, through the
file://scheme?To confirm everything is working, open up the page in Chrome, for example, and look at the Console.
By the way, there’s a validator for application cache manifests: http://manifest-validator.com/