From 2e5bf5b44ba1f516fbd9d468cc966663a110136e Mon Sep 17 00:00:00 2001 From: Marco Sadjadi Date: Thu, 21 May 2026 23:06:56 +0200 Subject: [PATCH] fix(web): self-destructing sw.js to evict the stale GoDaddy Airo worker The domain was parked on GoDaddy Airo, which registered a Workbox service worker. It keeps serving cached GoDaddy pages in browsers that visited the parked domain. Serving a self-destruct sw.js makes those browsers wipe the caches and unregister the worker on their next visit. Co-Authored-By: Claude Opus 4.7 (1M context) --- apps/web/public/sw.js | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 apps/web/public/sw.js diff --git a/apps/web/public/sw.js b/apps/web/public/sw.js new file mode 100644 index 0000000..ba6afec --- /dev/null +++ b/apps/web/public/sw.js @@ -0,0 +1,23 @@ +// Self-destructing service worker. +// +// buildmymcpserver.com previously ran on GoDaddy Airo, which installed a +// Workbox service worker that pre-cached GoDaddy's pages. That worker keeps +// serving stale GoDaddy content in browsers that visited the parked domain. +// Our app does not use a service worker — this file exists only so that when +// such a browser checks sw.js for an update it receives this script, which +// wipes the caches and unregisters itself. +self.addEventListener('install', () => self.skipWaiting()); + +self.addEventListener('activate', (event) => { + event.waitUntil( + (async () => { + const keys = await caches.keys(); + await Promise.all(keys.map((k) => caches.delete(k))); + await self.registration.unregister(); + const clients = await self.clients.matchAll({ type: 'window' }); + for (const client of clients) { + client.navigate(client.url); + } + })(), + ); +});