rubynz / kiwi-ruby-2017

The conference website for Kiwi Ruby 2017
https://2017-kiwi.ruby.nz
MIT License
2 stars 2 forks source link

Service worker setup #57

Closed ndorfin closed 7 years ago

ndorfin commented 7 years ago

This PR introduces ServiceWorkers to the site, but before it can be merged it requires the following changes:

The ServiceWorker cache uses a fingerprint of the latest Git commit SHA, plus the list of files in the cache. When a commit happens and the site is deployed, the new service worker will invalidate any previous caches and install itself over the existing service worker.

Abletech uses this technique on https://digitaldivide.nz, https://abletech.nz and other sites we've built for clients.

This PR also includes a cleanup of config.rb.

We should enhance this feature by notifying the user when the service worker is installed and ready to run offline. Most Android handsets should start prompting the user to add the site to their home screen once this is released.

As always, please shout if you have any questions. This is going to be a nifty feature for a nifty conference website 💪 😄

ndorfin commented 7 years ago

Hey @steveh - Can you confirm there's a rule in place in CloudFlare for setting /service-worker.js to be uncached? If so, we'll be good to go with ServiceWorkers! 🎉

steveh commented 7 years ago

I've added this:

screen shot 2017-09-26 at 9 28 55 pm

Is that what you mean?

ndorfin commented 7 years ago

@steveh Yup! Thanks!