After each redeployment of a single-page application, how does the page that you happen to be browsing update the cache?

this problem is mainly caused by the fact that after a single-page application index.html, file is packaged (css,js and so on will bring hash, so this is no problem), but the single-page application visits only one html and does not close the html file will not change. In fact, when we redeploy, we have to update the currently running code (css,js, image, index.html) to the latest, and we can only update index.html, first. At present, I find that updating index.html can only refresh the page. I would like to ask which hero has a good solution.


doesn't feel necessary
if you really want to do so, you can poll or set up a persistent connection server to actively inform updates

.
Menu