SlideShare a Scribd company logo
TAKE YOUR DRUPAL
SITES OFFLINE
With HTML5 AppCache and other assorted
teasing promises…
AppCache
           • Take a Website offline
           • Speed up access
           • Create ‘WebApps’
           • Perfect for mobile
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 server


AddType text/cache-manifest .appcache
How does it work?
CACHE MANIFEST
# 2013-03-12:v2

CACHE:
index.html
stylesheet.css

NETWORK:
login.php
/myapi

FALLBACK:
images/large/ images/offline.jpg
*.html /offline.html
SIMPLE DEMO
What about Drupal?
                 • More complex
                 • Dynamic


                 drupal.org/project/appcache


                 With some module
                 changes…
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; ?>>
Pointers
           • May not want to apply
             to whole site
           • Authenticated areas
           • Offline files
           • Admin items
           • User confusion
Taking it mobile
                   • PhoneGap if
                     AppStores
                   • WebApp in other
                     cases
GOTCHAS…
Take your drupal sites offline
Just some of them…
• Mobile / Browser detection
• Cache size restrictions
• PhoneGap
• JavaScript issues
• Local testing
• Inconsistent
• Media files
PLAN B
A whole other story…
THANK YOU…
Chris Ward
chris@moatmedia.com.au
@chrischinch

More Related Content

What's hot (20)

PDF
Thinking in Components
FITC
 
KEY
An Introduction to webOS
Kevin Decker
 
PPTX
Put a little Backbone in your WordPress
adamsilverstein
 
PDF
Parse Apps with Ember.js
Matthew Beale
 
PDF
Html5 and beyond the next generation of mobile web applications - Touch Tou...
RIA RUI Society
 
KEY
New Perspectives on Performance
mennovanslooten
 
PPTX
Untangling spring week4
Derek Jacoby
 
PDF
Webservices: connecting Joomla! with other programs.
Herman Peeren
 
PDF
Nuxtjs cheat-sheet
ValeriaCastillo71
 
PPTX
Developing advanced universal apps using html & js
Senthamil Selvan
 
PPTX
No more “cowboy coding”
Jim True
 
PDF
Drupal8 + AngularJS
Daniel Kanchev
 
PDF
Everything You Need to Know About the Top Changes in Drupal 8
Acquia
 
PPTX
Untangling spring week5
Derek Jacoby
 
PDF
Flexible UI Components for a Multi-Framework World
Kevin Ball
 
PDF
Best Practice Site Architecture in Drupal 8
Pantheon
 
PDF
Here Be Dragons - Debugging WordPress
Rami Sayar
 
PPTX
Browser Developer Tools
Christian Rokitta
 
PPTX
What is HTML 5?
Susan Winters
 
PPTX
Untangling the web9
Derek Jacoby
 
Thinking in Components
FITC
 
An Introduction to webOS
Kevin Decker
 
Put a little Backbone in your WordPress
adamsilverstein
 
Parse Apps with Ember.js
Matthew Beale
 
Html5 and beyond the next generation of mobile web applications - Touch Tou...
RIA RUI Society
 
New Perspectives on Performance
mennovanslooten
 
Untangling spring week4
Derek Jacoby
 
Webservices: connecting Joomla! with other programs.
Herman Peeren
 
Nuxtjs cheat-sheet
ValeriaCastillo71
 
Developing advanced universal apps using html & js
Senthamil Selvan
 
No more “cowboy coding”
Jim True
 
Drupal8 + AngularJS
Daniel Kanchev
 
Everything You Need to Know About the Top Changes in Drupal 8
Acquia
 
Untangling spring week5
Derek Jacoby
 
Flexible UI Components for a Multi-Framework World
Kevin Ball
 
Best Practice Site Architecture in Drupal 8
Pantheon
 
Here Be Dragons - Debugging WordPress
Rami Sayar
 
Browser Developer Tools
Christian Rokitta
 
What is HTML 5?
Susan Winters
 
Untangling the web9
Derek Jacoby
 

Similar to Take your drupal sites offline (20)

PPTX
The Power of HTML5 Offline: Mobile and More!
FITC
 
PDF
Using html5 to build offline applications
Woody Pewitt
 
PPT
HTML5 Offline Web Application
Allan Huang
 
PDF
Building great mobile apps: Somethings you might want to know
shwetank
 
PDF
Rails for Mobile Devices @ Conferencia Rails 2011
Alberto Perdomo
 
PPTX
Peter lubbers-html5-offline-web-apps
Skills Matter
 
PDF
HTML5 Offline Web Applications (Silicon Valley User Group)
robinzimmermann
 
PDF
Mozilla Web Apps - Super-VanJS
Robert Nyman
 
KEY
HTML5와 모바일
ACCESS
 
PPTX
Caching in drupal
Vivek Panicker
 
PDF
Firefox OS Apps & APIs - Dutch Mobile Conference / Serbia & Montenegro App da...
Jan Jongboom
 
PPT
Drupal Performance - SerBenfiquista.com Case Study
hernanibf
 
PPTX
Pure Speed Drupal 4 Gov talk
Bryan Ollendyke
 
PDF
How to build_a_mobile_site_with_drupal
Green For All
 
KEY
Offline Application Cache
Jonathan Stark
 
PPTX
Offline Storage
SP Balamurugan
 
PPTX
Html5 Offline Applications
Sunny Sharma
 
PDF
Drupal 7 performance and optimization
Shafqat Hussain
 
PDF
Charles
Keegan Street
 
PDF
Building an Appier Web - Velocity Amsterdam 2016
Andy Davies
 
The Power of HTML5 Offline: Mobile and More!
FITC
 
Using html5 to build offline applications
Woody Pewitt
 
HTML5 Offline Web Application
Allan Huang
 
Building great mobile apps: Somethings you might want to know
shwetank
 
Rails for Mobile Devices @ Conferencia Rails 2011
Alberto Perdomo
 
Peter lubbers-html5-offline-web-apps
Skills Matter
 
HTML5 Offline Web Applications (Silicon Valley User Group)
robinzimmermann
 
Mozilla Web Apps - Super-VanJS
Robert Nyman
 
HTML5와 모바일
ACCESS
 
Caching in drupal
Vivek Panicker
 
Firefox OS Apps & APIs - Dutch Mobile Conference / Serbia & Montenegro App da...
Jan Jongboom
 
Drupal Performance - SerBenfiquista.com Case Study
hernanibf
 
Pure Speed Drupal 4 Gov talk
Bryan Ollendyke
 
How to build_a_mobile_site_with_drupal
Green For All
 
Offline Application Cache
Jonathan Stark
 
Offline Storage
SP Balamurugan
 
Html5 Offline Applications
Sunny Sharma
 
Drupal 7 performance and optimization
Shafqat Hussain
 
Charles
Keegan Street
 
Building an Appier Web - Velocity Amsterdam 2016
Andy Davies
 
Ad

More from Chris Ward (20)

PDF
Electron - Solving our cross platform dreams?
Chris Ward
 
PDF
Automate your docs, automate yourself
Chris Ward
 
PDF
Back to the future with static site generators
Chris Ward
 
PDF
Building Cross Platform Apps with Electron
Chris Ward
 
PDF
Android Programming without Java
Chris Ward
 
PDF
The past, present and future of swift, Voxxed Belgrade 2016
Chris Ward
 
PDF
A Documentation Crash Course, LinuxCon 2016
Chris Ward
 
PDF
Always Listening User Experience
Chris Ward
 
PPT
JS, CMS, untangle the mess
Chris Ward
 
PPT
Why you should come to DrupalSouth
Chris Ward
 
PPTX
Extend Drupal with a CRM, DrupalGov 2013
Chris Ward
 
PPTX
Drupal DevOps - Melbourne DevOps July 2013
Chris Ward
 
PPTX
Removing Barriers in Engagement - Melbourne Geek Night, July 2013
Chris Ward
 
PPTX
Power your mobile app with Drupal - Melbourne Mobile, July 2013
Chris Ward
 
PPTX
Tweak, Test and Debug your mobile apps from Web directions code 13
Chris Ward
 
PPTX
Why your image of the world could be wrong
Chris Ward
 
PPTX
Green Renters' Giant Green Games
Chris Ward
 
PPTX
Customising civicrm
Chris Ward
 
PPTX
Drupal - Melbourne cryptoparty
Chris Ward
 
PPTX
HP Lovecraft, laneway learning
Chris Ward
 
Electron - Solving our cross platform dreams?
Chris Ward
 
Automate your docs, automate yourself
Chris Ward
 
Back to the future with static site generators
Chris Ward
 
Building Cross Platform Apps with Electron
Chris Ward
 
Android Programming without Java
Chris Ward
 
The past, present and future of swift, Voxxed Belgrade 2016
Chris Ward
 
A Documentation Crash Course, LinuxCon 2016
Chris Ward
 
Always Listening User Experience
Chris Ward
 
JS, CMS, untangle the mess
Chris Ward
 
Why you should come to DrupalSouth
Chris Ward
 
Extend Drupal with a CRM, DrupalGov 2013
Chris Ward
 
Drupal DevOps - Melbourne DevOps July 2013
Chris Ward
 
Removing Barriers in Engagement - Melbourne Geek Night, July 2013
Chris Ward
 
Power your mobile app with Drupal - Melbourne Mobile, July 2013
Chris Ward
 
Tweak, Test and Debug your mobile apps from Web directions code 13
Chris Ward
 
Why your image of the world could be wrong
Chris Ward
 
Green Renters' Giant Green Games
Chris Ward
 
Customising civicrm
Chris Ward
 
Drupal - Melbourne cryptoparty
Chris Ward
 
HP Lovecraft, laneway learning
Chris Ward
 
Ad

Recently uploaded (20)

PPTX
Simple and concise overview about Quantum computing..pptx
mughal641
 
PPTX
cloud computing vai.pptx for the project
vaibhavdobariyal79
 
PDF
Trying to figure out MCP by actually building an app from scratch with open s...
Julien SIMON
 
PDF
AI Unleashed - Shaping the Future -Starting Today - AIOUG Yatra 2025 - For Co...
Sandesh Rao
 
PDF
GDG Cloud Munich - Intro - Luiz Carneiro - #BuildWithAI - July - Abdel.pdf
Luiz Carneiro
 
PDF
Per Axbom: The spectacular lies of maps
Nexer Digital
 
PDF
Market Insight : ETH Dominance Returns
CIFDAQ
 
PDF
Presentation about Hardware and Software in Computer
snehamodhawadiya
 
PDF
Researching The Best Chat SDK Providers in 2025
Ray Fields
 
PDF
MASTERDECK GRAPHSUMMIT SYDNEY (Public).pdf
Neo4j
 
PPTX
AI Code Generation Risks (Ramkumar Dilli, CIO, Myridius)
Priyanka Aash
 
PDF
Google I/O Extended 2025 Baku - all ppts
HusseinMalikMammadli
 
PPTX
Agile Chennai 18-19 July 2025 | Emerging patterns in Agentic AI by Bharani Su...
AgileNetwork
 
PDF
Research-Fundamentals-and-Topic-Development.pdf
ayesha butalia
 
PPTX
AVL ( audio, visuals or led ), technology.
Rajeshwri Panchal
 
PDF
Peak of Data & AI Encore - Real-Time Insights & Scalable Editing with ArcGIS
Safe Software
 
PPTX
Agile Chennai 18-19 July 2025 Ideathon | AI Powered Microfinance Literacy Gui...
AgileNetwork
 
PDF
OFFOFFBOX™ – A New Era for African Film | Startup Presentation
ambaicciwalkerbrian
 
PPTX
OA presentation.pptx OA presentation.pptx
pateldhruv002338
 
PPTX
Farrell_Programming Logic and Design slides_10e_ch02_PowerPoint.pptx
bashnahara11
 
Simple and concise overview about Quantum computing..pptx
mughal641
 
cloud computing vai.pptx for the project
vaibhavdobariyal79
 
Trying to figure out MCP by actually building an app from scratch with open s...
Julien SIMON
 
AI Unleashed - Shaping the Future -Starting Today - AIOUG Yatra 2025 - For Co...
Sandesh Rao
 
GDG Cloud Munich - Intro - Luiz Carneiro - #BuildWithAI - July - Abdel.pdf
Luiz Carneiro
 
Per Axbom: The spectacular lies of maps
Nexer Digital
 
Market Insight : ETH Dominance Returns
CIFDAQ
 
Presentation about Hardware and Software in Computer
snehamodhawadiya
 
Researching The Best Chat SDK Providers in 2025
Ray Fields
 
MASTERDECK GRAPHSUMMIT SYDNEY (Public).pdf
Neo4j
 
AI Code Generation Risks (Ramkumar Dilli, CIO, Myridius)
Priyanka Aash
 
Google I/O Extended 2025 Baku - all ppts
HusseinMalikMammadli
 
Agile Chennai 18-19 July 2025 | Emerging patterns in Agentic AI by Bharani Su...
AgileNetwork
 
Research-Fundamentals-and-Topic-Development.pdf
ayesha butalia
 
AVL ( audio, visuals or led ), technology.
Rajeshwri Panchal
 
Peak of Data & AI Encore - Real-Time Insights & Scalable Editing with ArcGIS
Safe Software
 
Agile Chennai 18-19 July 2025 Ideathon | AI Powered Microfinance Literacy Gui...
AgileNetwork
 
OFFOFFBOX™ – A New Era for African Film | Startup Presentation
ambaicciwalkerbrian
 
OA presentation.pptx OA presentation.pptx
pateldhruv002338
 
Farrell_Programming Logic and Design slides_10e_ch02_PowerPoint.pptx
bashnahara11
 

Take your drupal sites offline

  • 1. TAKE YOUR DRUPAL SITES OFFLINE With HTML5 AppCache and other assorted teasing promises…
  • 2. AppCache • Take a Website offline • Speed up access • Create ‘WebApps’ • Perfect for mobile
  • 3. How does it work? <!DOCTYPE html> <html manifest="/cache.manifest"> <body> ... </body> </html>
  • 4. How does it work? • (Maybe) In .htaccess or similar • Needs to be running on a server AddType text/cache-manifest .appcache
  • 5. How does it work? CACHE MANIFEST # 2013-03-12:v2 CACHE: index.html stylesheet.css NETWORK: login.php /myapi FALLBACK: images/large/ images/offline.jpg *.html /offline.html
  • 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
  • 14. PLAN B A whole other story…

Editor's Notes

  • #6: 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&apos;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 &apos;#&apos; are comment lines, but can also serve another purpose. An application&apos;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.