Service worker doesn't return file from cache
问题 I'm trying to cache a single page webapp with a service worker. It should get all it's files from the cache and update that cache only when a new service worker-version is published. With a precache function i'm writing some files to the cache as follows: function precache() { return caches.open(CACHE).then(function(cache) { return cache.addAll([ 'index.html', 'js/script.js', 'img/bg.png', 'img/logo.svg', ... ]); }); } (I've tried to cache with and without "/" before the paths, and even with