Talking about "Why Progressive Web Apps?" and how you can start building them on Rails
Progressive WebApps on RailsRoss Kaffenberger@rossta
View Slide
Native > WebReliableIndependent of connectivityWorks offlineSync-ableInstallableRe-engageable
Web > NativeResponsiveWrite once, Run everywhere*FreshLinkableDiscoverableFast first-visit
Best of both worlds(on the web)Progressive Web Apps
Service Worker•Event driven•Worker context•No DOM access
Service Worker•Intercept requests•Access to cache, IndexedDB, etc.•Send push notifications•Sync with server in background
Service Worker
Service Worker•HTTPS only•Scoped by URL, e.g./serviceworker.js/admin/serviceworker.js
Service Worker on RailsProblem: Making Service Worker scriptswork with the asset pipelineGET /serviceworker.js
Service Worker on Railsgem “serviceworker-rails”•Serves pipeline assets from canonical urls•Customizes response headers
Service Worker on Rails
Service Worker on Rails Sandbox
github.com/hemanth/awesome-pwagithub.com/TalAter/awesome-service-workers
github.com/rossta/serviceworker-rails
@rosstarossta.netRoss Kaffenberger