Skip to content

Instantly share code, notes, and snippets.

@riking
Created September 2, 2015 18:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save riking/849a5a9b75d979c2aaa5 to your computer and use it in GitHub Desktop.
Save riking/849a5a9b75d979c2aaa5 to your computer and use it in GitHub Desktop.
self.oninstall = function (e) {
// populate cache
// download all resources needed for offline experience
}
self.onactivate = function (e) {
// cleanup like managing cache
}
self.onfetch = function (e) {
// deal with network traffic
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment