Skip to content

Instantly share code, notes, and snippets.

@beebole
Created July 25, 2017 19:52
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 beebole/7181904aaeabd9b9f2a83d9b07008159 to your computer and use it in GitHub Desktop.
Save beebole/7181904aaeabd9b9f2a83d9b07008159 to your computer and use it in GitHub Desktop.
Mobile offline - SW file
self.addEventListener( 'activate', function( event ){
event.waitUntil(
caches.open( 'name_your_cache_container' )
.then( function( cache ) {
return cache.addAll( urlsToCache );
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment