Built with Chinaski

Progressive Web App (PWA)

Chinaski can present your built site as an installable Progressive Web App. Enabling PWA (off by default, Settings → PWA) makes the static builder generate three extra artifacts per language: a web app manifest, a service worker, and an offline fallback page.

The manifest

manifest.json is generated per language from your settings:

  • Name and short name — the site name, with the short name defaulting to it (truncated to about 16 characters). Both settable.
  • Description — your tagline.
  • Start URL and scope — per language (the language prefix, or the per-language subdomain in subdomain URL mode).
  • Display mode — standalone (default), minimal-ui, fullscreen, or browser.
  • Theme and background colors — used for browser chrome and the splash screen.
  • Icons — the 192 and 512 install icons come from your favicon upload (including a maskable variant). No favicon set means no icons in the manifest — set one unless you plan not to expose an installable app.

The service worker

Generated per language with the build’s timestamp baked in as the cache version — every rebuild produces a fresh cache and retires old ones automatically.

  • Precache on install: the home page, the offline page, the manifest, the blog root, the search page, every page and post URL in that language, plus bundled fonts — fetched individually so one missing file doesn’t abort the install.
  • Runtime strategy: page navigations are network-first (fresh content when online, cached copy when connecting, then the offline page); only same-origin requests are intercepted; cross-origin traffic passes through untouched; form POSTs have their own dedicated fallback path.
  • A new worker takes over quickly (skipWaiting + claiming clients).

Because the worker’s cache version changes on every build, published updates replace stale cache automatically — readers get the new content on their next visit rather than being locked to an old snapshot.

The offline page

offline.html is generated from the site’s own templates — with the header, footer, org contacts, RTL handling, and your configured offline title and message (Settings → PWA). It’s the destination when a visitor requests a page that’s neither fresh offline nor cached.

Settings at a glance

Setting Purpose Default
Enable PWA Generates manifest, service worker, offline page at build time off
Short name Home-screen icon label (~16 chars) site name
Theme color Browser chrome color #6A0DAD
Background color Splash screen background #FFF8DC
Display mode standalone / minimal-ui / fullscreen / browser standalone
Offline title / message Content of the offline fallback page from tagline

Operational notes

  • Changes to PWA settings trigger a rebuild, as usual.
  • The shipped reverse-proxy examples serve /sw.js with a no-cache header — that’s deliberate: it lets a newly built service worker replace the previous one promptly while every other asset keeps its long cache.
  • Each language gets its own complete PWA set (own manifest, own worker, own offline page), consistent with the per-language URL model.