Answer the question
In order to leave comments, you need to log in
How to notify the application about a new version (and force it to reload)?
Good afternoon!
There is a SPA application, scripts and styles are added to index.html when building, with contenthash in the file name.
The index.html itself is not cached.
After deploying a new version of the application, there are two problems:
1) Previously opened clients use the old code.
2) Dynamic requests for individual bundles fail because these files have a new name.
A simple solution suggests itself - force a page reload, or ask the client to do so.
But what is the best way to notify about code changes?
Answer the question
In order to leave comments, you need to log in
add a separate query that returns the current version, let the client periodically compare its own and the current one
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question