PWA Offline Demo
Versioned Service Worker Caching with spider-deps
Cache Status
Status:Checking...
Version:-
Files:-
Update Available!
How It Works
- Run spider-deps.js - Discovers all JS/CSS dependencies from entry point
- Generates cache-manifest.json - Lists all files with content hash version
- Service worker caches files - Creates versioned cache atomically
- App works offline - Cache-first strategy serves files instantly
Version Matching
The content hash ensures version consistency:
- Any file change creates a new version hash
- Each version gets its own isolated cache
- Old caches are only deleted after new cache is complete
- No mixed versions ever loaded
Try It
- Open DevTools Network tab
- Check "Offline" in Network panel
- Reload the page - it still works!
- Uncheck "Offline" and modify a file
- Run
node spider-deps.js - Click "Check for Updates" - new version detected
Debug Info