events
events copied to clipboard
A better service worker cache strategy
The current implementation of the service worker uses sw-precache to cache resources.
This approach caches all the pages assets and updates the cache in the background. This leads to a problem when you first visit the site after an update. You get the old version of the assets and need to reload to get the latest version. This is less than ideal on something like event websites which tries to be a single page site, with no actual page reloading happening until you visit the site again.
Possible fix
Notify the user that the site's content needs to be updated (and prompt for a reload). It's also the strategy suggested by Google