SlideShare a Scribd company logo
HTML5 Offline 
Applications 
C# Corner – 13 Sep’14 Sunny Kumar
Agenda 
• Application Cache 
• Anatomy of an Offline Application 
• Cache Manifest 
• Application Cache Event Life Cycle
Application Cache 
The AppCache API facilitates caching of specified 
files locally based on manifest url- resulting in: 
 Offline Browsing 
 Speed 
 Reduced Server Load 
 Resilience 
 No Storage Limit * 
 Event Driven API
Anatomy of HTML Offline 
Applications
Web Applications without 
offline mechanism
Offline Browser Support 
Reference: http://caniuse.com/#feat=offline-apps
The Cache “manifest” 
 Is a simple text file which tells the browser what to 
Cache 
 Is a list of all the resources intended for offline 
accessibility 
 can be located anywhere on your web server 
 must be served with content type 
“text/cache-manifest” 
 the first line of manifest file is always 
”CACHE MANIFEST”
The Cache “manifest” 
Sample Manifest File 
CACHE MANIFEST 
/myStyles.css 
/myScript.js 
/centerImage.jpg 
Suggested extension is “.appcache”
The Cache “manifest” 
CACHE 
NETWORK 
FALLBACK 
SETTINGS
The Cache “manifest” 
1. CACHE 
CACHE MANIFEST 
# This is a comment 
CACHE: 
/css/main.css 
/js/main.js 
/img/logo.png 
explicitly cached resources
The Cache “manifest” 
2. NETWORK 
CACHE MANIFEST 
# This is a comment 
CACHE: 
/css/main.css 
/js/main.js 
/img/logo.png 
NETWORK: 
* 
usually just "*“. Allow to access files through network if not 
available in cache.
The Cache “manifest” 
3. FALLBACK 
CACHE MANIFEST 
# This is a comment 
CACHE: 
/css/main.css 
/js/main.js 
/img/logo.png 
NETWORK: 
* 
FALLBACK: 
/ /offline.html 
Resource to load, if requested resource is not available offline 
and network is not available.
The Cache “manifest” 
4. SETTINGS 
CACHE MANIFEST 
# This is a comment 
CACHE: 
/css/main.css 
/js/main.js 
/img/logo.png 
NETWORK: 
* 
FALLBACK: 
/ /offline.html 
SETTINGS: 
prefer-online | fast 
Prefer-online: 
Prefer access resources from 
network when online 
Fast: 
Access files from cache if 
available even when online.
The Cache “manifest” 
CACHE MANIFEST 
# This is a comment 
CACHE: Default Section 
/css/main.css 
/js/main.js 
/img/logo.png 
NETWORK: 
* 
FALLBACK: 
/ /offline.html 
SETTINGS: 
prefer-online | fast 
Four Sections of Cache Manifest
AppCache Events 
obsolete 
checking 
downloading 
noupdate 
cached 
progress 
updateready 
error
Demo Time  
http://www.spritecow.com/
My Credentials 
• C# Corner MVP / Author / Speaker 
• Microsoft Certified Professional 
• Developer - .NET Stack 
• twitter: @sunny_delhi 
• email: sunnyk_sharma@outlook.com 
• facebook: bit.ly/sunnykumar 
Sunny Kumar
Do you have a 
feedback? 
http://goo.gl/bb83DL
Thank 
You!

More Related Content

What's hot (20)

KEY
Web API Basics
LearnNowOnline
 
DOC
Tutorial asp.net
Vivek K. Singh
 
PPTX
Introduction to vaadin
leonardsiu
 
PPTX
The ASP.NET Web API for Beginners
Kevin Hazzard
 
PPTX
Vaadin filtering table example
leonardsiu
 
PDF
WordPress Server Security
Peter Baylies
 
PDF
Workshop HTML5+PhoneGap by Ivano Malavolta
Commit University
 
PPTX
Managing Multisite: Lessons from a Large Network
William Earnhardt
 
PPTX
How To Use Host-Named Site Collections
André Vala
 
PDF
Responsive Websites and Grid-Based Layouts by Gabriel Walt
AEM HUB
 
PPTX
HTML 5
Rajan Pal
 
PPTX
Microsoft/Zend Webcast on Cloud Computing
Josh Holmes
 
PDF
BeEF_EUSecWest-2012_Michele-Orru
Michele Orru
 
PPTX
Introduction to Web Architecture
Chamnap Chhorn
 
PPTX
ASP.NET WEB API Training
Chalermpon Areepong
 
PPTX
REST and ASP.NET Web API (Tunisia)
Jef Claes
 
PDF
Installing wordpress
Dave Wallace
 
PPTX
CQ5.x Maintenance Webinar 2013
Andrew Khoury
 
PDF
Api manager preconference
ColdFusionConference
 
PDF
Content Management Systems (CMS) & Wordpress theme development
Dave Wallace
 
Web API Basics
LearnNowOnline
 
Tutorial asp.net
Vivek K. Singh
 
Introduction to vaadin
leonardsiu
 
The ASP.NET Web API for Beginners
Kevin Hazzard
 
Vaadin filtering table example
leonardsiu
 
WordPress Server Security
Peter Baylies
 
Workshop HTML5+PhoneGap by Ivano Malavolta
Commit University
 
Managing Multisite: Lessons from a Large Network
William Earnhardt
 
How To Use Host-Named Site Collections
André Vala
 
Responsive Websites and Grid-Based Layouts by Gabriel Walt
AEM HUB
 
HTML 5
Rajan Pal
 
Microsoft/Zend Webcast on Cloud Computing
Josh Holmes
 
BeEF_EUSecWest-2012_Michele-Orru
Michele Orru
 
Introduction to Web Architecture
Chamnap Chhorn
 
ASP.NET WEB API Training
Chalermpon Areepong
 
REST and ASP.NET Web API (Tunisia)
Jef Claes
 
Installing wordpress
Dave Wallace
 
CQ5.x Maintenance Webinar 2013
Andrew Khoury
 
Api manager preconference
ColdFusionConference
 
Content Management Systems (CMS) & Wordpress theme development
Dave Wallace
 

Viewers also liked (20)

PDF
Online / Offline
Peter Rozek
 
PPTX
HTML5 AppCache: The Manifest
Ralf Schwoebel
 
PPTX
.Net Fundamentals
Sunny Sharma
 
PPTX
Node.js and express
Sunny Sharma
 
PPTX
Typescript Fundamentals
Sunny Sharma
 
PPTX
Inversion of Control in MVC
Sunny Sharma
 
PPTX
Real Time Data Visualization using asp.net / SignalR + D3.js
Sunny Sharma
 
PPTX
Prototype & Inheritance in JavaScript
Sunny Sharma
 
PDF
HTML5 Storage/Cache
Andy Wang
 
PPT
Incorporating Web Services in Mobile Applications - Web 2.0 San Fran 2009
Aduci
 
PDF
OnConnectionLost: The life of an offline web application - JSUnconf 2015
Johannes Thönes
 
PPTX
Updated: NW.js - Desktop Apps with Javascript
Ralf Schwoebel
 
PDF
HTML5: friend or foe (to Flash)?
Remy Sharp
 
PPTX
Anatomy of mobile App development
Ralf Schwoebel
 
PDF
Offline Strategies for HTML5 Web Applications - oscon13
Stephan Hochdörfer
 
PPTX
From JavaEE to Android: Way in one click?
Sergii Zhuk
 
PDF
Offline strategies for HTML5 web applications - frOSCon8
Stephan Hochdörfer
 
PDF
Anatomy of an HTML 5 mobile web app
Ivano Malavolta
 
DOC
Plat 05
imecommunity
 
PDF
Style Validator at breakout session of TPAC2015
Takeharu Igari
 
Online / Offline
Peter Rozek
 
HTML5 AppCache: The Manifest
Ralf Schwoebel
 
.Net Fundamentals
Sunny Sharma
 
Node.js and express
Sunny Sharma
 
Typescript Fundamentals
Sunny Sharma
 
Inversion of Control in MVC
Sunny Sharma
 
Real Time Data Visualization using asp.net / SignalR + D3.js
Sunny Sharma
 
Prototype & Inheritance in JavaScript
Sunny Sharma
 
HTML5 Storage/Cache
Andy Wang
 
Incorporating Web Services in Mobile Applications - Web 2.0 San Fran 2009
Aduci
 
OnConnectionLost: The life of an offline web application - JSUnconf 2015
Johannes Thönes
 
Updated: NW.js - Desktop Apps with Javascript
Ralf Schwoebel
 
HTML5: friend or foe (to Flash)?
Remy Sharp
 
Anatomy of mobile App development
Ralf Schwoebel
 
Offline Strategies for HTML5 Web Applications - oscon13
Stephan Hochdörfer
 
From JavaEE to Android: Way in one click?
Sergii Zhuk
 
Offline strategies for HTML5 web applications - frOSCon8
Stephan Hochdörfer
 
Anatomy of an HTML 5 mobile web app
Ivano Malavolta
 
Plat 05
imecommunity
 
Style Validator at breakout session of TPAC2015
Takeharu Igari
 
Ad

Similar to Html5 Offline Applications (20)

PPTX
Taking Web Applications Offline
Matt Casto
 
PPTX
Rails caching
VzMind ItSelf
 
PPTX
Html5 cache mechanism & local storage
Sendhil Kumar Kannan
 
PPTX
Local storage
Adam Crabtree
 
PDF
Using html5 to build offline applications
Woody Pewitt
 
PDF
Presentation on Japanese doc sprint
Go Chiba
 
PPTX
Offline Storage
SP Balamurugan
 
PPTX
The Power of HTML5 Offline: Mobile and More!
FITC
 
PPT
Maven Overview
FastConnect
 
PPTX
App cache vs localStorage
senthil_hi
 
KEY
Going on an HTTP Diet: Front-End Web Performance
Adam Norwood
 
PPTX
Maven.pptx
Govardhan Bhavani
 
PPTX
ASP.NET 4.0 Cache Extensibility
akrakovetsky
 
PPTX
Chris OBrien - Pitfalls when developing with the SharePoint Framework (SPFx)
Chris O'Brien
 
PPTX
AEM (CQ) Dispatcher Security and CDN+Browser Caching
Andrew Khoury
 
PDF
Docker
Michael Lihs
 
PDF
Always on! ... or not?
Carsten Sandtner
 
PDF
Caching objects-in-memory
Mauro Cassani
 
PPTX
SCWCD : Servlet web applications : CHAP : 3
Ben Abdallah Helmi
 
PPTX
PHP Dependency Management with Composer
Adam Englander
 
Taking Web Applications Offline
Matt Casto
 
Rails caching
VzMind ItSelf
 
Html5 cache mechanism & local storage
Sendhil Kumar Kannan
 
Local storage
Adam Crabtree
 
Using html5 to build offline applications
Woody Pewitt
 
Presentation on Japanese doc sprint
Go Chiba
 
Offline Storage
SP Balamurugan
 
The Power of HTML5 Offline: Mobile and More!
FITC
 
Maven Overview
FastConnect
 
App cache vs localStorage
senthil_hi
 
Going on an HTTP Diet: Front-End Web Performance
Adam Norwood
 
Maven.pptx
Govardhan Bhavani
 
ASP.NET 4.0 Cache Extensibility
akrakovetsky
 
Chris OBrien - Pitfalls when developing with the SharePoint Framework (SPFx)
Chris O'Brien
 
AEM (CQ) Dispatcher Security and CDN+Browser Caching
Andrew Khoury
 
Docker
Michael Lihs
 
Always on! ... or not?
Carsten Sandtner
 
Caching objects-in-memory
Mauro Cassani
 
SCWCD : Servlet web applications : CHAP : 3
Ben Abdallah Helmi
 
PHP Dependency Management with Composer
Adam Englander
 
Ad

More from Sunny Sharma (8)

PPTX
Cognitive Services by Abhimanyu Kumar Vatsa
Sunny Sharma
 
PPTX
JavaScript Debugging Tips & Tricks
Sunny Sharma
 
PPTX
Microsoft Azure DocumentDB - Global Azure Bootcamp 2016
Sunny Sharma
 
PPTX
AngularJS Forms Validation
Sunny Sharma
 
PPTX
JavaScript Debugging Tips and Tricks
Sunny Sharma
 
PPTX
Exploring Git in Visual Studio 2013
Sunny Sharma
 
PPTX
Self Hosting
Sunny Sharma
 
PPTX
Evolution of wcf
Sunny Sharma
 
Cognitive Services by Abhimanyu Kumar Vatsa
Sunny Sharma
 
JavaScript Debugging Tips & Tricks
Sunny Sharma
 
Microsoft Azure DocumentDB - Global Azure Bootcamp 2016
Sunny Sharma
 
AngularJS Forms Validation
Sunny Sharma
 
JavaScript Debugging Tips and Tricks
Sunny Sharma
 
Exploring Git in Visual Studio 2013
Sunny Sharma
 
Self Hosting
Sunny Sharma
 
Evolution of wcf
Sunny Sharma
 

Recently uploaded (20)

PDF
"Beyond English: Navigating the Challenges of Building a Ukrainian-language R...
Fwdays
 
PDF
What Makes Contify’s News API Stand Out: Key Features at a Glance
Contify
 
PDF
Jak MŚP w Europie Środkowo-Wschodniej odnajdują się w świecie AI
dominikamizerska1
 
PPTX
From Sci-Fi to Reality: Exploring AI Evolution
Svetlana Meissner
 
PPTX
"Autonomy of LLM Agents: Current State and Future Prospects", Oles` Petriv
Fwdays
 
PDF
CIFDAQ Market Wrap for the week of 4th July 2025
CIFDAQ
 
PPTX
Building Search Using OpenSearch: Limitations and Workarounds
Sease
 
PDF
Presentation - Vibe Coding The Future of Tech
yanuarsinggih1
 
PDF
HCIP-Data Center Facility Deployment V2.0 Training Material (Without Remarks ...
mcastillo49
 
PDF
Chris Elwell Woburn, MA - Passionate About IT Innovation
Chris Elwell Woburn, MA
 
PPTX
COMPARISON OF RASTER ANALYSIS TOOLS OF QGIS AND ARCGIS
Sharanya Sarkar
 
PDF
Achieving Consistent and Reliable AI Code Generation - Medusa AI
medusaaico
 
PDF
NewMind AI - Journal 100 Insights After The 100th Issue
NewMind AI
 
PDF
LLMs.txt: Easily Control How AI Crawls Your Site
Keploy
 
PDF
Newgen Beyond Frankenstein_Build vs Buy_Digital_version.pdf
darshakparmar
 
PDF
New from BookNet Canada for 2025: BNC BiblioShare - Tech Forum 2025
BookNet Canada
 
PPTX
WooCommerce Workshop: Bring Your Laptop
Laura Hartwig
 
PDF
CIFDAQ Token Spotlight for 9th July 2025
CIFDAQ
 
PDF
Empower Inclusion Through Accessible Java Applications
Ana-Maria Mihalceanu
 
PDF
DevBcn - Building 10x Organizations Using Modern Productivity Metrics
Justin Reock
 
"Beyond English: Navigating the Challenges of Building a Ukrainian-language R...
Fwdays
 
What Makes Contify’s News API Stand Out: Key Features at a Glance
Contify
 
Jak MŚP w Europie Środkowo-Wschodniej odnajdują się w świecie AI
dominikamizerska1
 
From Sci-Fi to Reality: Exploring AI Evolution
Svetlana Meissner
 
"Autonomy of LLM Agents: Current State and Future Prospects", Oles` Petriv
Fwdays
 
CIFDAQ Market Wrap for the week of 4th July 2025
CIFDAQ
 
Building Search Using OpenSearch: Limitations and Workarounds
Sease
 
Presentation - Vibe Coding The Future of Tech
yanuarsinggih1
 
HCIP-Data Center Facility Deployment V2.0 Training Material (Without Remarks ...
mcastillo49
 
Chris Elwell Woburn, MA - Passionate About IT Innovation
Chris Elwell Woburn, MA
 
COMPARISON OF RASTER ANALYSIS TOOLS OF QGIS AND ARCGIS
Sharanya Sarkar
 
Achieving Consistent and Reliable AI Code Generation - Medusa AI
medusaaico
 
NewMind AI - Journal 100 Insights After The 100th Issue
NewMind AI
 
LLMs.txt: Easily Control How AI Crawls Your Site
Keploy
 
Newgen Beyond Frankenstein_Build vs Buy_Digital_version.pdf
darshakparmar
 
New from BookNet Canada for 2025: BNC BiblioShare - Tech Forum 2025
BookNet Canada
 
WooCommerce Workshop: Bring Your Laptop
Laura Hartwig
 
CIFDAQ Token Spotlight for 9th July 2025
CIFDAQ
 
Empower Inclusion Through Accessible Java Applications
Ana-Maria Mihalceanu
 
DevBcn - Building 10x Organizations Using Modern Productivity Metrics
Justin Reock
 

Html5 Offline Applications

  • 1. HTML5 Offline Applications C# Corner – 13 Sep’14 Sunny Kumar
  • 2. Agenda • Application Cache • Anatomy of an Offline Application • Cache Manifest • Application Cache Event Life Cycle
  • 3. Application Cache The AppCache API facilitates caching of specified files locally based on manifest url- resulting in:  Offline Browsing  Speed  Reduced Server Load  Resilience  No Storage Limit *  Event Driven API
  • 4. Anatomy of HTML Offline Applications
  • 5. Web Applications without offline mechanism
  • 6. Offline Browser Support Reference: http://caniuse.com/#feat=offline-apps
  • 7. The Cache “manifest”  Is a simple text file which tells the browser what to Cache  Is a list of all the resources intended for offline accessibility  can be located anywhere on your web server  must be served with content type “text/cache-manifest”  the first line of manifest file is always ”CACHE MANIFEST”
  • 8. The Cache “manifest” Sample Manifest File CACHE MANIFEST /myStyles.css /myScript.js /centerImage.jpg Suggested extension is “.appcache”
  • 9. The Cache “manifest” CACHE NETWORK FALLBACK SETTINGS
  • 10. The Cache “manifest” 1. CACHE CACHE MANIFEST # This is a comment CACHE: /css/main.css /js/main.js /img/logo.png explicitly cached resources
  • 11. The Cache “manifest” 2. NETWORK CACHE MANIFEST # This is a comment CACHE: /css/main.css /js/main.js /img/logo.png NETWORK: * usually just "*“. Allow to access files through network if not available in cache.
  • 12. The Cache “manifest” 3. FALLBACK CACHE MANIFEST # This is a comment CACHE: /css/main.css /js/main.js /img/logo.png NETWORK: * FALLBACK: / /offline.html Resource to load, if requested resource is not available offline and network is not available.
  • 13. The Cache “manifest” 4. SETTINGS CACHE MANIFEST # This is a comment CACHE: /css/main.css /js/main.js /img/logo.png NETWORK: * FALLBACK: / /offline.html SETTINGS: prefer-online | fast Prefer-online: Prefer access resources from network when online Fast: Access files from cache if available even when online.
  • 14. The Cache “manifest” CACHE MANIFEST # This is a comment CACHE: Default Section /css/main.css /js/main.js /img/logo.png NETWORK: * FALLBACK: / /offline.html SETTINGS: prefer-online | fast Four Sections of Cache Manifest
  • 15. AppCache Events obsolete checking downloading noupdate cached progress updateready error
  • 16. Demo Time  http://www.spritecow.com/
  • 17. My Credentials • C# Corner MVP / Author / Speaker • Microsoft Certified Professional • Developer - .NET Stack • twitter: @sunny_delhi • email: [email protected] • facebook: bit.ly/sunnykumar Sunny Kumar
  • 18. Do you have a feedback? http://goo.gl/bb83DL