GoogleChrome / GoogleChrome/samples

Service Worker example of how to prompt user to install cache and update cache?

Open
#525 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
5.9k
Forks
2.4k
Avg merge
24m
Merged PRs (30d)
2

Description

Hi there. I've been studying service workers for some time and have yet to find an example of how to prompt users if they would like to install a cached version of the site and then also prompt them to install when an update is available. Does one of the service worker examples do this and I just didn't understand it?

__User Stories__

1. On first page load, prompt the user asking if they would like to cache the app. User says yes, caching of assets begins.
2. When caching of assets completes, notify the user the app is now available offline.
3. While app is still open, detect when an update is available and prompt the user to install. User says yes, caching of assets begins.
4. When caching of assets completes, notify the user the app is now available offline and gives directions how to reload the app (close the window and reopen?).
5. Repeat 3 and 4.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.