aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJakob Stendahl <jakobste@uio.no>2020-10-14 13:20:02 +0200
committerJakob Stendahl <jakobste@uio.no>2020-10-14 13:20:02 +0200
commit34d740bdb19f08f94b71e0e1d269a89772f86d90 (patch)
treee9f140f874c260a1bb991d12075c05c99da74796
parent57c5a27e8590bf1e847842ae6c9e8c82e959ccd3 (diff)
downloadAurora-data-34d740bdb19f08f94b71e0e1d269a89772f86d90.tar.gz
Aurora-data-34d740bdb19f08f94b71e0e1d269a89772f86d90.zip
Add startpath to manifest, try using service-worker-index
-rw-r--r--src/service-worker.ts5
-rw-r--r--static/manifest.json2
2 files changed, 3 insertions, 4 deletions
diff --git a/src/service-worker.ts b/src/service-worker.ts
index b721b18..0af4ccb 100644
--- a/src/service-worker.ts
+++ b/src/service-worker.ts
@@ -55,12 +55,11 @@ self.addEventListener('fetch', <EventType extends FetchEvent>(event: EventType)
// for pages, you might want to serve a shell `service-worker-index.html` file,
// which Sapper has generated for you. It's not right for every
// app, but if it's right for yours then uncomment this section
- /*
if (url.origin === self.origin && routes.find(route => route.pattern.test(url.pathname))) {
- event.respondWith(caches.match('/service-worker-index.html'));
+ event.respondWith(caches.match('/Aurora-data/service-worker-index.html'));
return;
}
- */
+
if (event.request.cache === 'only-if-cached') return;
diff --git a/static/manifest.json b/static/manifest.json
index 9378523..be2d463 100644
--- a/static/manifest.json
+++ b/static/manifest.json
@@ -4,7 +4,7 @@
"name": "Aurora Data",
"short_name": "aurora data",
"display": "standalone",
- "start_url": "/",
+ "start_url": "/Aurora-data/",
"orientation": "portrait",
"icons": [
{