1
0
mirror of https://github.com/chinchang/web-maker.git synced 2025-05-05 01:58:21 +02:00

seriveworkerregistration: show alert when new content available

This commit is contained in:
Kushagra Gour 2018-12-09 23:12:39 +05:30
parent deb03e7c7d
commit f3c3730666

View File

@ -49,6 +49,11 @@ if (
// It's the perfect time to display a "New content is available; please refresh."
// message in the page's interface.
console.log('New or updated content is available.');
if (window.alertsService) {
window.alertsService.add(
'New version available. Please refresh the page.'
);
}
} else {
// At this point, everything has been precached.
// It's the perfect time to display a "Content is cached for offline use." message.