HTML 5 Offline
Support (Manifest) and Local Storage example with Visual Studio
HTML5 storage enables a site to
work offline and ability to provide a local cache for data on the server but
not subject to frequent change.
HTML5 storage supports two types
of storages LocalStorage and SessionStorage. First is designed as a long-term
storage mechanism for data that spans sessions and time and second is only persistent for the life of a particular user
session.
LocalStorage is great for relatively
static files or database tables, to increase performance especially when offline
versions of the data needed.
You
can download your required pages when you are online. If network connectivity
goes off, HTML 5 offline application will automatically serves the offline web
pages which you have downloaded when you were online.
Browser
Supports for Offline and Local Storage:
- IE (8.0+)
- FIREFOX (3.5+)
- SAFARI (4+)
- CHROME (4+)
- OPERA (10.5+)
- IPHONE (2.0+)
- ANDROID (2.0+)
Manifest file items:
- JavaScript
- Web pages
- CSS
- Images
- etc.
Manifest files sections:
- CACHE
- NETWORK
- FALLBACK
CACHE section:
Declare files to be cached. Files will be served from the cache, even if
application is online.
NETWORK section: Declare files that browser should try to download from the server, regardless of whether the user is online or offline.
FALLBACK section: Define fallback resources to be used when the application is offline.
NETWORK section: Declare files that browser should try to download from the server, regardless of whether the user is online or offline.
FALLBACK section: Define fallback resources to be used when the application is offline.
Storage Capacity: 5
MB
Consolidate links to learn Offline and local storage features of HTML 5:
- Good reasons to use HTML 5
- Check whether network is On-Line or Off-Line
- HTML 5 Offline Support (Manifest) working example
- HTML 5 Local Storage working example
- Handling application cache events
No comments:
Post a Comment