Drel/Docs/Offline Packages
Reference · offline package v1

Strong Offline Packages

Use a verified package when a web app must launch reliably without network connectivity or WebKit cache eviction. A manifest describes an app; a package delivers it durably.

What becomes offline

A complete installed package contains its declared HTML, CSS, JavaScript, images, fonts and icon assets in Drel-managed persistent storage. After every declared file is verified by SHA-256 and the package is atomically activated, its entrypoint can open with airplane mode on.

Offline assets do not make APIs offline. A page can still call HTTPS APIs whenever the device has network. When offline, API calls, third-party CDNs, and dynamic images need an application-level fallback.

How an install works

Nothing is activated until every file has been verified. That is what makes the offline guarantee hold.

Strong offline package installation: the phone fetches the resource manifest, checks its digest against the signed binding, downloads each file, checks size and SHA-256 per file, writes into a staging directory, and only then activates atomically.
Why staging matters. A partially downloaded package is never the app. The previous complete version stays launchable until the new one verifies completely, so a failed update cannot leave the user with a broken app.

Trust and installation

  1. A trusted parent app manifest identifies the web app and pins its Web App Manifest and resource manifest.
  2. The resource manifest (package.json) declares each allowed file by path, size and SHA-256 digest.
  3. Drel downloads and verifies the complete package into staging, then activates it atomically.
  4. The user explicitly downloads, updates or removes a package. A push may open a registered app, but cannot silently install or upgrade one.

Only an operator-approved, signed app registration can authorize an offline package. There is intentionally no public "self-sign any website" shortcut.

Update lifecycle

EventExpected result
First downloadThe current package is installed only after every file passes SHA-256 verification.
New version availablePublish immutable assets and a new versioned resource manifest; the user initiates an update.
Verification or network failureThe prior complete package remains active. A partial staging directory is discarded.
Push arrivesIt routes to an already registered app and route. It never mutates package bytes.

Standard PWA compatibility

Use standard manifest.webmanifest fields for name, icons, start URL, scope and display. Drel’s drel_offline profile binds the offline resource set separately so it can be verified exactly. Service Worker and ordinary browser cache are useful optimizations, but they are not Drel’s durable-offline guarantee.

Try the live fixtures: Strong Offline Demo and Offline + Live Data Demo.