CodePark/ questions / Monitoring, errors & rollout
START PRACTICINGPRACTICE
Frontend question · Frontend system design › Monitoring, errors & rollout

After a deploy, users with tabs open from before the release start seeing "Loading chunk 42 failed" errors on navigation. What is the most robust fix?

Keep previous builds' hashed assets available for a while and, on chunk load failure, reload to the new version

Keep previous builds' hashed assets for a while, and reload to the new version when a chunk fails to load. Old tabs ask for chunk filenames from the previous build. If you delete those files, the old tabs break. "Set Cache-Control: no-store on all JavaScript files" is the tempting wrong answer. It hurts performance and does not fix deleted files. "Disable code splitting" has the same two problems.