Ad goes here

Sunday, 24 January 2016

How to make your web application faster using cache manifest?

Web applications have become a major part of our life and many peoples use it almost all the time. But when peoples access slow application then they either leave the application or looking for another similar application which fulfill their requirements. Wouldn’t it be great if you can make your application faster and even work without internet connection?

Lets discuss how you can make it easily.

The HTML5 introduce most important feature 'application cache' which help users to access browser based application without internet connection. Here are the following advantages you can get using application cache.

  1. Offline Browsing – Users can access even they are offline.
  2. Application Speed – Application files will be in local server and you can imagine how users will get user experiences.
  3. Reduce Server Load – The browsers only will access updated files from the server

How the application cache works?
To enable application cache, you have to use manifest (Cache Manifest) attribute in master page’s element or in which pages you wanted to make cache. It’s very simple, as shown in following steps.

Step 1: Add manifest attribute.
<html manifest='example.appcache'>

Step 2: Create manifest file as example below and add file names which you wanted to cache and save it with ‘.appcache’ file extension using notepad.

# 2016-01-01 v1.0.0


/html/ /OfflineMessage.html

Cache manifest: The cache manifest is mandatory to add in first line and add cache file names under this.

# 2016-01-01 v1.0.0: The version is one of the important thing which need to be mentioned in the manifest. The version change only required when you are updating any application files otherwise it will show previously cached files.

Network: Under network files will never be cached which is also necessary for application security.

Fallback: Under fallback specified files will served in place of all files in /html/, in case of internet and file availability.

What are the benefits of using this?
It’s important for web based application to be accessible without internet connection and just imagine when you are developing tutorial site then how its help users to use your application. The more important thing is performance of your application, as all files are cached in your local PC then there is no way to wait for page loading.


Books for you (Crafted with )