Skip to content
This repository has been archived by the owner on Jul 9, 2021. It is now read-only.

A better service worker cache strategy #39

Open
karthikb351 opened this issue Jul 23, 2017 · 0 comments
Open

A better service worker cache strategy #39

karthikb351 opened this issue Jul 23, 2017 · 0 comments
Assignees
Labels

Comments

@karthikb351
Copy link
Contributor

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

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants