PWA 最小服务工作者只是为了触发安装按钮?
PWA minimal service worker just for trigger the install button?
仅用于触发安装按钮的最小服务工作者是什么?
我不想缓存任何内容,应用程序无法在离线模式下运行,但我希望允许用户在桌面上创建快捷方式。
看起来最小的 service worker 就是这个
self.addEventListener('fetch', function(event) {
event.respondWith(fetch(event.request));
});
“超级”最小服务工作者是
self.addEventListener('fetch', function() {
return;
});
无需对 fetch 方法做任何事情
仅用于触发安装按钮的最小服务工作者是什么?
我不想缓存任何内容,应用程序无法在离线模式下运行,但我希望允许用户在桌面上创建快捷方式。
看起来最小的 service worker 就是这个
self.addEventListener('fetch', function(event) {
event.respondWith(fetch(event.request));
});
“超级”最小服务工作者是
self.addEventListener('fetch', function() {
return;
});
无需对 fetch 方法做任何事情