Service worker keeps serving the previous deploy's JavaScript after a new Vercel deploy
I have a small PWA on Vercel (plain Node functions, no framework). Pages are rendered by a serverless function and link their scripts as /app.js, /build.js and so on. The site is behind Cloudflare. After a deploy, phones that had visited before keep running yesterday's build.js for hours. The HTML is new (it has links to URLs that only exist in the new deploy), but the old script doesn't know about them, so those pages break until the browser cache expires or the user clears site data. I also have a service worker that precaches the scripts for offline use, which makes it worse: even when the
0 upvotes
View original discussion ↗
Comments
Sign in or sign up to comment and upvote.
No comments yet.