Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Offline web applications


Published on

These are slides from my talk at What Do You Know night in Brisbane. The talk time is limited to five minutes.

Published in: Technology, Design
  • Be the first to comment

Offline web applications

  1. 1. Making web siteavailable in offline mode @MehdiKhalili
  2. 2. That is two fold:1. Use offline cache to get the browser to cache your website2. Use client-side storage to let users change data in offline mode
  3. 3. Offline cache (AKA AppCache)• Communicated through a manifest “file”: • set in the html tag’s manifest attribute • extension should be ‘appcache’ • mime type should be ‘text/cache-manifest’• The manifest does not have to be static
  4. 4. Some tips on AppCache• AppCache does NOT expire: so somehow version your manifest• Checkout out your cache entries on chrome://appcache-internals/
  5. 5. Client side storageWeb Storage Indexed Database• Great browser support • Relatively good browser support• Poor performance • Great performance• Simple to use • Rather complex API• A good choice ATM • All in all a good choice
  6. 6. Web SQL - Deprecated!!• Good browser support (except IE and FF)• Good performance• Transactional• Familiar SQL• Perhaps not such a great choice
  7. 7. Some tips on offline persistence• Store user changes in client storage in offline mode• Sync up as soon as you go online to avoid data loss• navigator.isOnline is broken. Don’t use it • Don’t use AJAX to check connectivity • Use AppCache events
  8. 8. much more information on my blog @MehdiKhalili