From 6e87e330f359028ac09f89eb342adcdabe95826a Mon Sep 17 00:00:00 2001 From: Josef Citrine Date: Mon, 13 Jun 2016 13:49:48 +0100 Subject: [PATCH] Ignore upload in service worker --- public/service-worker.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/public/service-worker.js b/public/service-worker.js index a0f174cf..58eaa9db 100644 --- a/public/service-worker.js +++ b/public/service-worker.js @@ -56,8 +56,9 @@ self.addEventListener('activate', function (event) { // Basic offline mode // Just respond with an offline error page for now self.addEventListener('fetch', function(event) { - if (event.request.url.indexOf('stage.pony.fm') > -1) { - event.respondWith(fetch(event.request)); + if (event.request.url.indexOf('stage.pony.fm') > -1 || event.request.url.indexOf('upload') > -1) { + // Ignore some requests + return; } else { event.respondWith( caches.match(event.request).then(function (response) {