产品名称:医学影像和数据处理与通讯软件 型号:浩连 版本:1.0
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

29 lines
692 B

let cacheName = 'screen-and-window-demo';
let filesToCache = [
'.',
'favicon-512.png',
// 'favicon.ico',
'index.html',
'main.js',
'notes.html',
'popup.html',
'slide.html',
'style.css',
];
// Start the service worker and cache all of the app's content
self.addEventListener('install', function(event) {
event.waitUntil(caches.open(cacheName).then(function(cache) {
return cache.addAll(filesToCache);
}));
});
// Serve cached content when offline
self.addEventListener('fetch', function(event) {
event.respondWith(
// TODO: Update cache with fetch response.
fetch(event.request).catch(function() {
return caches.match(event.request);
})
);
});