diff --git a/index.html b/index.html index c6c6f5a..421b57e 100644 --- a/index.html +++ b/index.html @@ -3,6 +3,7 @@ + Scale Reader: read the numbers off a basic bathroom scale diff --git a/public/af56e4ffb79cf9d9140d41bb3d3075fe.txt b/public/af56e4ffb79cf9d9140d41bb3d3075fe.txt new file mode 100644 index 0000000..1033ad6 --- /dev/null +++ b/public/af56e4ffb79cf9d9140d41bb3d3075fe.txt @@ -0,0 +1 @@ +af56e4ffb79cf9d9140d41bb3d3075fe \ No newline at end of file diff --git a/public/robots.txt b/public/robots.txt new file mode 100644 index 0000000..152aa82 --- /dev/null +++ b/public/robots.txt @@ -0,0 +1,4 @@ +User-agent: * +Allow: / + +Sitemap: https://scale-reader.vercel.app/sitemap.xml diff --git a/public/sitemap.xml b/public/sitemap.xml new file mode 100644 index 0000000..ddca3fa --- /dev/null +++ b/public/sitemap.xml @@ -0,0 +1,4 @@ + + + https://scale-reader.vercel.app/ + diff --git a/src/sw/worker.js b/src/sw/worker.js index ea69565..623f050 100644 --- a/src/sw/worker.js +++ b/src/sw/worker.js @@ -71,6 +71,8 @@ export function registerWorker(scope, config) { scope.addEventListener("fetch", (event) => { const req = event.request; if (req.method !== "GET" || new URL(req.url).origin !== scope.location.origin) return; + // Search-engine files (robots, sitemap, IndexNow key) always come from the network, never the app shell. + if (/^\/(robots\.txt|sitemap\.xml|[0-9a-f]{32}\.txt)$/.test(new URL(req.url).pathname)) return; if (req.mode === "navigate") { event.respondWith(handleNavigation(scope, cacheName, req)); return;