Skip to content

Offline-first PWA with OPFS model caching #394

Description

@sauravpanda

Context

OPFS provides 3-4x faster I/O than IndexedDB. Cache API already partially integrated in Flare's browser demo.

Proposal

  • Use OPFS as primary model cache (faster than IndexedDB)
  • Service worker pre-caches model on first visit
  • Stream weights via fetch(), write to OPFS layer-by-layer
  • Subsequent visits load from OPFS (instant start)
  • Support partial caching: first N layers for fast progressive inference
  • Turn any static site into an AI-powered app with zero server costs

Impact

  • True offline LLM — works without internet after first model download
  • PWA installable on mobile home screens

Metadata

Metadata

Assignees

No one assigned

    Labels

    browserBrowser/WASM specificinnovationNovel/differentiated features

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions