prepare not affect to v1 // like cache new resouce etc }); self.addEventListener('activate', (e) => { console.info('activate', e); // do some cleanup of v1 // like schema update etc }); 34
.then((registration) => { return navigator.serviceWorker.ready; }); 40 master.js • Controller controls client in scope • Could register multiple controller in different scope • But only one Controller for Client always
• Always Check registration & update • Design Scope Carefully • Maintain Cache Carefully • Never forget save to DB while event lifetime • Basiclly no code outside event handler • Start with Implicit Proxy ◦ Local Implicit proxy: works same w/o sw ◦ Local Orgin Server: generate contents in sw • Push is not only usecase for sw