Force service worker activate
This commit is contained in:
		
							parent
							
								
									6078363311
								
							
						
					
					
						commit
						10c943d28a
					
				
					 1 changed files with 4 additions and 2 deletions
				
			
		| 
						 | 
					@ -13,8 +13,10 @@ const cachee = [
 | 
				
			||||||
self.addEventListener('install', ev => {
 | 
					self.addEventListener('install', ev => {
 | 
				
			||||||
	console.info('installed');
 | 
						console.info('installed');
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	// Cache
 | 
						ev.waitUntil(Promise.all([
 | 
				
			||||||
	ev.waitUntil(caches.open(_VERSION_).then(cache => cache.addAll(cachee)));
 | 
							self.skipWaiting(), // Force activate
 | 
				
			||||||
 | 
							caches.open(_VERSION_).then(cache => cache.addAll(cachee)) // Cache
 | 
				
			||||||
 | 
						]));
 | 
				
			||||||
});
 | 
					});
 | 
				
			||||||
 | 
					
 | 
				
			||||||
// アクティベートされたとき
 | 
					// アクティベートされたとき
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue