2. That is two fold:
1. Use offline cache to get the browser
to cache your website
2. Use client-side storage to let users
change data in offline mode
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.
5. Some tips on AppCache
• AppCache does NOT expire: so somehow version your manifest
• Checkout out your cache entries on chrome://appcache-internals/
6. Client side storage
Web 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
7. Web SQL - Deprecated!!
• Good browser support (except IE and FF)
• Good performance
• Transactional
• Familiar SQL
• Perhaps not such a great choice
8. 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
9. much more information on my blog
http://www.mehdi-khalili.com/presentations/wdyk-offline-web
@MehdiKhalili
Hinweis der Redaktion
offline cache (also know as appcache) is the bit that makes some of the pages available in offline mode Client storage allows you to store data while in offline mode