Align with https://github.com/slightlyoff/ServiceWorker/blob/17267180874564156b95dd24f5eb61050b0f1618/service_worker.ts