Skip to content
Back to skills

Pwa Patterns

ASecurity

- **Web App Manifest** (`manifest.json`): name, icons (192+512px), start_url, display: standalone - **Service Worker**: Caching strategy, offline fallback, background sync - **HTTPS**: Required for service worker registration

  • 3 stars
  • 0 votes
  • 0 copies
  • 2 views
  • Added May 27, 2026
data-aishellnextjsnodeapi

Works with

  • api

Security analysis

A100/100

Scanned May 27, 2026

npx -y skills add ByeongminLee/nextjs-claude-code --skill pwa-patterns --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Pwa Patterns?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Pwa Patterns
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/byeongminlee-pwa-patterns/badge)](https://www.skillsdirectory.com/skills/byeongminlee-pwa-patterns)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
# PWA Patterns

## Core Requirements
- **Web App Manifest** (`manifest.json`): name, icons (192+512px), start_url, display: standalone
- **Service Worker**: Caching strategy, offline fallback, background sync
- **HTTPS**: Required for service worker registration

## Next.js Setup (next-pwa)
```js
// next.config.js
const withPWA = require('next-pwa')({
  dest: 'public',
  disable: process.env.NODE_ENV === 'development',
  register: true,
  skipWaiting: true,
});
module.exports = withPWA({ /* next config */ });
```

## Caching Strategies
- **Cache First**: Static assets (images, fonts, CSS) — fast, stale until update
- **Network First**: API responses, dynamic pages — fresh, fallback to cache offline
- **Stale While Revalidate**: Semi-dynamic content — fast from cache, update in background
- **Cache Only**: App shell, critical assets bundled at build time
- **Network Only**: Real-time data (chat, stock prices) — no caching

## Offline Support
- Offline fallback page: `/offline.html` served when network unavailable
- IndexedDB for complex offline data (use `idb` wrapper)
- Background sync: Queue failed requests, retry when online (`workbox-background-sync`)
- Cache API responses for read-heavy features

## Best Practices
- Precache app shell + critical routes at install time
- Runtime cache API responses with TTL
- Show offline indicator UI when `navigator.onLine === false`
- Handle service worker updates: prompt user to refresh
- Audit with Lighthouse PWA checklist

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.