Offline Ruby on Rails

How to make your rails app work offline.

How are we going to do this?!

We're going to use Service Workers

Traditional Request

With a Service Worker

With a Service Worker


Installing with Gem

Installing with Gem

  • Go through files, show it working

How to access the debugging tools

  • about:debugging
  • Throw up URLs for different browsers

Approaches to caching

  • Cache files ahead of time
  • Cache after visiting
  • Mix of both.

Using webpacker in your service worker

  • Make it load with ES6 using webpacker-pwa
  • Sweet, we can use workbox now.