Access web application offline – HTML5 Application cache
What is offline web application?
How online and offline application works?
What is Manifest file?
//Rest of the design code
Manifest file must be served with the content type text/cache-manifest
In application every pages which we wants to cache locally must have manifest attribute.
How to create Manifest file?
In this section there is list all path to the files which we want to cache locally.
The list of resources we define in network section is not cached locally. When these type of resources accessed offline then it gives an error.
In network section if we don’t want to list of page separately then we can use wildcard character “*”.
Other Important things to remember
Advantages of app cache
There are three main benefits to using AppCache. The first should be obvious, it’s faster. Since the files are already cached in memory the execution is significantly quicker. Secondly, network traffic is reduced since there is no need to pull down a cached file from the server. Lastly, it can be very useful to have certain applications be accessible both online and offline.
Disadvantages of app cache
There are really only two limitations. First is the fact that some browsers put a limit on how much memory they will allot for caching files. The general consensus on the limit seems to be 5 Mb right now but that could change over time. The second is that AppCache manifest files must be served from the server with the correct mime-type or the manifest file may not be recognized by the browser. The correct mime-type is text/cache-manifest. For many servers, especially older ones, this means the mime-type may have to be manually configured.