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:
parent
deb03e7c7d
commit
f3c3730666
@ -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.
|
||||
|
Loading…
x
Reference in New Issue
Block a user