Slides accompanying my presentatation at https://www.meetup.com/The-New-Dynamic/events/236530076/
For more information, see https://jeffy.info/2017/01/24/offline-first-for-your-templated-site-part-2.html
Offline-first for Your Static Site@jeffposnick • Google Developer RelationsJanuary 2017 • the New Dynamic Meetup
View Slide
What's a static site?
What's offline-first?
Why offline-first?
Why offline first?
What's a service worker?
What's a service worker?A network proxy,written in JavaScript,running in your browser.
What are my options for making astatic site offline-first?
Option 1:Full-page caching
Full-page cachingReal-world examplehttps://paul.kinlan.me
Full-page cachingBenefits● Service worker simplicity.● Minimal deployment overhead.● No content duplication.● Works well with multiple layouts.
Full-page cachingDrawbacks● Cache overhead.● Messy updates.
Option 2:App Shell
App ShellReal-world examplehttps://ifixit-pwa.appspot.com
App ShellBenefits● Clean updates.● Low-overhead precaching.
App ShellDrawbacks● Routing logic in your service worker.● Duplication of content and routes.
Option 3:Service worker templating
Service worker templatingReal-world examplehttps://jeffy.info
Service worker templatingBenefits● Clean updates.● Low-overhead precaching.● No Single Page App (SPA) required.
Service worker templatingDrawbacks● Requires a JavaScript-friendly templating system.● Heavyweight service worker code.● Routing logic in your service worker.● Duplication of content and routes.
Thanks! @jeffposnickhttps://jeffy.info