You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
All the things needed from service workers to manifests and opengraph descriptions
Copy this code into your app.js to install the service worker:
if ('serviceWorker' in navigator) { //Check if browser supports service workers
window.addEventListener('load', function () {
navigator.serviceWorker.register('/serviceworker.js').then(function (registration) {
// console.log("Registration was successful");
}, function (err) {
// console.log("registration failed :(", err);
});
});
}
Edit the content of the resources object in serviceworker.js and include the files you want cached or copy paste this code: