Last active
January 14, 2018 19:00
-
-
Save luke-denton-aligent/d1ab998ddd877f26376776ec433b0a13 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
// Offline Web Applications course on Udacity https://classroom.udacity.com/courses/ud899 | |
if (!navigator.serviceWorker) return; //Feature detection | |
navigator.serviceWorker.register("/sw.js").then(function() { //Include the service worker js file | |
//Registration worked | |
}).catch(function() { | |
//Registration didn't work | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment