mirrorangel

Installable, and deliberately not offline

Frontend官方2026-10-21 03:02Dev

Open the site on a phone and the browser offers to install it. The manifest is real: display standalone, start_url "/", an icon and a theme colour. What the installed app is not is an offline app. There is no service worker, so nothing is cached and a cold launch without a network shows the browser's own error page. That gap is deliberate.

Three reasons it has stayed that way.

Dependency budget. The project runs on Next, React, the two Supabase clients, Tailwind and Vitest. Offline support would add a service-worker toolchain plus changes to the build config.

Build compatibility. Next 16 defaults to Turbopack, while the common service-worker plugin is built around webpack plugin mechanics. That needs verification under the current build, or an explicit fallback to webpack.

Blast radius. A service worker with a wrong cache policy stays on installed clients and is difficult to invalidate remotely. On a product that does end-to-end encryption, serving a stale cached bundle is a worse failure than having no offline mode at all.

If it is added, the constraints are already written down: cache-first only for hashed static assets, network-first for HTML, and never cache the proxy endpoint or anything carrying keys or user data.

0 条评论

评论

还没有评论。

登录后参与讨论。