Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1, viewport-fit=cover" />
<link rel="canonical" href="https://scale-reader.vercel.app/" />
<title>Scale Reader: read the numbers off a basic bathroom scale</title>
<meta name="description" content="Point your phone at a basic bathroom scale, read each number off its screen, fix any that are wrong, and save them as one dated row for your spreadsheet. Stays on your phone. No account." />
<meta name="color-scheme" content="light dark" />
Expand Down
1 change: 1 addition & 0 deletions public/af56e4ffb79cf9d9140d41bb3d3075fe.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
af56e4ffb79cf9d9140d41bb3d3075fe
4 changes: 4 additions & 0 deletions public/robots.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
User-agent: *
Allow: /

Sitemap: https://scale-reader.vercel.app/sitemap.xml
4 changes: 4 additions & 0 deletions public/sitemap.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
<url><loc>https://scale-reader.vercel.app/</loc></url>
</urlset>
2 changes: 2 additions & 0 deletions src/sw/worker.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
Loading