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.
TAKE YOUR DRUPALSITES OFFLINEWith HTML5 AppCache and other assortedteasing promises…
AppCache           • Take a Website offline           • Speed up access           • Create ‘WebApps’           • Perfect f...
How does it work?<!DOCTYPE html><html manifest="/cache.manifest"><body>...</body></html>
How does it work?• (Maybe) In .htaccess or similar• Needs to be running on a serverAddType text/cache-manifest .appcache
How does it work?CACHE MANIFEST# 2013-03-12:v2CACHE:index.htmlstylesheet.cssNETWORK:login.php/myapiFALLBACK:images/large/ ...
SIMPLE DEMO
What about Drupal?                 • More complex                 • Dynamic                 drupal.org/project/appcache   ...
How does it work?Adds variable that is reset on cache clear, amendsmanifest and causes browser rebuild.Builds cached pages...
Pointers           • May not want to apply             to whole site           • Authenticated areas           • Offline f...
Taking it mobile                   • PhoneGap if                     AppStores                   • WebApp in other        ...
GOTCHAS…
Just some of them…• Mobile / Browser detection• Cache size restrictions• PhoneGap• JavaScript issues• Local testing• Incon...
PLAN BA whole other story…
THANK YOU…Chris Wardchris@moatmedia.com.au@chrischinch
Take your drupal sites offline
Upcoming SlideShare
Loading in …5
×

Take your drupal sites offline

4,159 views

Published on

Take your Drupal sites offline with HTML 5 AppCache and turn it into a webapp, perhaps with somehting like PhoneGap.

Published in: Technology
  • Be the first to comment

  • Be the first to like this

Take your drupal sites offline

  1. 1. TAKE YOUR DRUPALSITES OFFLINEWith HTML5 AppCache and other assortedteasing promises…
  2. 2. AppCache • Take a Website offline • Speed up access • Create ‘WebApps’ • Perfect for mobile
  3. 3. How does it work?<!DOCTYPE html><html manifest="/cache.manifest"><body>...</body></html>
  4. 4. How does it work?• (Maybe) In .htaccess or similar• Needs to be running on a serverAddType text/cache-manifest .appcache
  5. 5. How does it work?CACHE MANIFEST# 2013-03-12:v2CACHE:index.htmlstylesheet.cssNETWORK:login.php/myapiFALLBACK:images/large/ images/offline.jpg*.html /offline.html
  6. 6. SIMPLE DEMO
  7. 7. What about Drupal? • More complex • Dynamic drupal.org/project/appcache With some module changes…
  8. 8. How does it work?Adds variable that is reset on cache clear, amendsmanifest 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 printbase_path(); ?>appcache.manifest" dir="<?php print$language->dir; ?>"<?php print $rdf_namespaces; ?>>
  9. 9. Pointers • May not want to apply to whole site • Authenticated areas • Offline files • Admin items • User confusion
  10. 10. Taking it mobile • PhoneGap if AppStores • WebApp in other cases
  11. 11. GOTCHAS…
  12. 12. Just some of them…• Mobile / Browser detection• Cache size restrictions• PhoneGap• JavaScript issues• Local testing• Inconsistent• Media files
  13. 13. PLAN BA whole other story…
  14. 14. THANK YOU…Chris Wardchris@moatmedia.com.au@chrischinch

×