Created
November 6, 2016 09:51
-
-
Save simonmcmanus/c85cfe81eb45dd9aed52321d463469a4 to your computer and use it in GitHub Desktop.
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
if ('serviceWorker' in navigator) { | |
navigator.serviceWorker.register('/service-worker.js'); | |
} else { | |
appCacheNanny.start() | |
} | |
appCacheNanny.on('updateready', function () { | |
location.reload() | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment