Closed ndorfin closed 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! 🎉
I've added this:
Is that what you mean?
@steveh Yup! Thanks!
This PR introduces ServiceWorkers to the site, but before it can be merged it requires the following changes:
/service-worker.js
added to the no-cache policy @stevehThe 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 💪 😄