1
0
mirror of https://github.com/chinchang/web-maker.git synced 2025-02-24 15:12:51 +01:00

prevent sw in debug env

This commit is contained in:
Kushagra Gour 2018-01-21 19:07:12 +05:30
parent 21776e2f7e
commit 317ed8fa08

View File

@ -16,7 +16,8 @@
/* eslint-env browser */
if ('serviceWorker' in navigator) {
if ('serviceWorker' in navigator && document.cookie.indexOf('wmdebug') === -1) {
// Delay registration until after the page has loaded, to ensure that our
// precaching requests don't degrade the first visit experience.
// See https://developers.google.com/web/fundamentals/instant-and-offline/service-worker/registration