CRITICAL FIX: Automatic cache invalidation for admin JavaScript files.
Root cause: Service worker and browser cache serving stale admin files
even after deploying fixes. Users had to manually clear cache daily.
Changes:
1. Service Worker (v0.1.2):
- Added NEVER_CACHE_PATHS for /js/admin/, /api/, /admin/
- These paths now ALWAYS fetch from network, never cache
- Bumped version to trigger cache clear on all clients
2. Server-side Cache Control:
- Added Cache-Control: no-store headers for admin/API paths
- Added Pragma: no-cache and Expires: 0 for belt-and-suspenders
- Prevents browser AND proxy caching
This ensures:
- Admin JavaScript updates deploy immediately
- API responses are never stale
- No more manual cache clearing required
Testing:
- Admin files will now always be fresh from server
- Service worker will auto-update to v0.1.2 on next visit
- Browsers will respect no-cache headers going forward
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>