7. What about Drupal?
• More complex
• Dynamic
drupal.org/project/appcache
With some module
changes…
8. How does it work?
Adds variable that is reset on cache clear, amends
manifest and causes browser rebuild.
Builds cached pages as it goes.
<html xmlns="http://www.w3.org/1999/xhtml"
xml:lang="<?php print $language->language; ?>"
version="XHTML+RDFa 1.0" manifest="<?php print
base_path(); ?>appcache.manifest" dir="<?php print
$language->dir; ?>"<?php print $rdf_namespaces; ?>>
9. Pointers
• May not want to apply
to whole site
• Authenticated areas
• Offline files
• Admin items
• User confusion
10. Taking it mobile
• PhoneGap if
AppStores
• WebApp in other
cases
13. Just some of them…
• Mobile / Browser detection
• Cache size restrictions
• PhoneGap
• JavaScript issues
• Local testing
• Inconsistent
• Media files
CACHE:This is the default section for entries. Files listed under this header (or immediately after the CACHE MANIFEST) will be explicitly cached after they're downloaded for the first time.NETWORK:Files listed under this section are white-listed resources that require a connection to the server. All requests to these resources bypass the cache, even if the user is offline. Wildcards may be used.FALLBACK:An optional section specifying fallback pages if a resource is inaccessible. The first URI is the resource, the second is the fallback. Both URIs must be relative and from the same origin as the manifest file. Wildcards may be used.Lines starting with a '#' are comment lines, but can also serve another purpose. An application's cache is only updated when its manifest file changes. So for example, if you edit an image resource or change a javascript function, those changes will not be re-cached. You must modify the manifest file itself to inform the browser to refresh cached files. Creating a comment line with a generated version number, hash of your files, or timestamp is one way to ensure users have the latest version of your software. You can also programmatically update the cache once a new version is ready as discussed in the Updating the cache section.