Last active
January 9, 2016 03:58
-
-
Save den-chan/84fcfdd2412018fea3a3 to your computer and use it in GitHub Desktop.
Writes to console the file your service worker has cached as "index.html". (Within the limits of String)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
caches.match( | |
new Request( "index.html" ) | |
).then( function (response) { | |
return response.body.getReader().read() | |
} ).then( function (stream) { | |
console.log( String.fromCharCode.apply(null, stream.value) ) | |
} ) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment