I'm getting a bit confused by the (varied) terminology for HTML5 offline storage.
I think that AppCache is another name for Web Storage and you specify what will be stored offline via the Cache Manifest. And there are two types: LocalStorage (persists beyond the current session) and session storage (which does not persist beyond the current session).
The above is what I'm reading from W3C and from wikipedia but Head First HTML5 Programming (Freeman & Robinson) describes LocalStorage in depth, then has Web Storage (with info on Cache Manifest) in the appendix ("things we aren't covering).
Am I understanding this correctly?
A cache is just some data that we remember we got back from a particular request (or URL). Thankfully the browser has this wonderful and simple way to store data called localStorage. LocalStorage allows us to read and write key/value pairs to and from the browser's storage.
AppCache is specifically designed to allow web apps (and web sites) to be made available offline, though the same speed benefits which the normal browser cache provides, when the user is online, are also provided by AppCache.
Caching refers to storing information locally to speed communication between a client such as a web browser and a server such as a web server. The cache can be located on the client side, the server side, or – as is often the case – both.
The Application Cache (or AppCache) allows a developer to specify which files the browser should cache and make available to offline users. Your app will load and work correctly, even if the user presses the refresh button while they're offline.
WebStorage is the possibility in HTML5 to store data on client side (think of it like cookies, but with usually 5 MB available space). The're two ways to store that data (scope):
http://diveintohtml5.info/storage.html
AppCache is the HTML5-ability to store the whole web-app (pages, images, css, JavaScript) in the browser to make it available even if the client has no internet connection at all.
http://appcache.offline.technology/
LocalStorage:
AppCache:
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With