I am trying to add some static pages to cache using standard technique in the install event of the service worker:
self.addEventListener('install',function(event) {
event.waitUntil(
caches.open(static_cache).then(function(cache){
return cache.addAll([
'/',
'index.html',
'css/styles.css',
'js/dbhelper.js',
'js/main.js',
'js/restaurant_info.js'
])
})
)
})
but when I look into cached items - I see they're cached under relative paths:
So of course when fetch event comes for the full path - there will be no match in cache. Any idea why this is happening?