Fix PDFs still failing on browsers that used the old build #5

Merged
reudy merged 1 commit from sw-bypass-http-cache into main 2026-09-27 12:18:04 +02:00

1 commit

Author SHA1 Message Date
01624c6efa Bypass the HTTP cache when the service worker caches assets
Hashed assets are served as immutable for a year. Before the nginx MIME
fix, the pdf.js worker was served as application/octet-stream, and the
browser kept that response. Each new service worker then copied it from
the HTTP cache into its offline cache, so PDFs still failed to render
after the server was fixed. Fetching with cache: 'reload' always takes
the current response from the server.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VsorPV3JeJRoZ1mD1pdvtL
2026-09-27 10:17:21 +00:00