ZephyrZephyr
Guide
Features
API
Examples
GitHub
Guide
Features
API
Examples
GitHub
  • Guide

    • Getting Started
    • Installation
    • Quick Start
    • Configuration

Installation

npm / pnpm / yarn

Install Zephyr from npm:

# npm
npm install @maravilla-labs/zephyr

# pnpm
pnpm add @maravilla-labs/zephyr

# yarn
yarn add @maravilla-labs/zephyr

CDN

Use Zephyr directly from a CDN without installation:

<!-- Auto-register service worker -->
<script type="module" src="https://unpkg.com/@maravilla-labs/zephyr@0.2.0/lib/zephrInstall.js"></script>

For the service worker configuration file:

// zephyrConfig.js
importScripts('https://unpkg.com/@maravilla-labs/zephyr@0.2.0/lib/zephyrWorker.js');

File Structure

After installation, you need two files:

your-project/
├── index.html          # Include zephrInstall.js
└── zephyrConfig.js     # Your caching configuration

Requirements

RequirementDetails
HTTPSService Workers require a secure context
BrowserChrome 60+, Firefox 44+, Safari 11.1+, Edge 17+
IndexedDBRequired for cache storage

Localhost Exception

Service Workers work on localhost without HTTPS for development purposes.

Next Steps

Continue to Quick Start to set up your first caching rule.

Edit this page
Last Updated:: 1/13/26, 2:54 AM
Contributors: labertasch
Prev
Getting Started
Next
Quick Start