---
title: "Service Worker"
method: GET
path: "/sw.js"
---

# Service Worker

`GET /sw.js`

## Request

- Base URL: `https://deepbluealpha.io` (the document declares no server; this is the origin it was published from)
- URL: `https://deepbluealpha.io/sw.js`
- Auth: none declared

PWA service worker — MUST be served from root scope (not /static/) so it
can intercept requests for /feed, /wallets, /api/* etc.

Auto-bumps CACHE_VERSION based on the latest mtime across critical static
assets (CSS + dashboard JS + sw.js itself). Each deploy updates those mtimes,
so the cache key changes on every deploy → users get fresh assets on the next
page load instead of one-page-stale CSS/JS. Falls back to the file's hardcoded
"v6" if anything goes wrong, so the SW always works.

## Response `200`

Successful Response

- unknown

---

[API](https://skmtc.dev/deepbluealpha/apis/deep-blue-alpha.md) · [All operations](https://skmtc.dev/deepbluealpha/apis/deep-blue-alpha/llms.txt) · [OpenAPI document](https://skmtc.dev/deepbluealpha/apis/deep-blue-alpha/revisions/f56e32e6aa71?raw)
