0

I'm using Angular 13 as a client connecting to a .NET Core backend.

When both the backend API and the client are redeployed to the servers, how can I make sure the preexisting incompatible clients will be updated as soon as they are relaunched, or at least forced to be relaunched.

This seems a common problem to me and I have not found any guidance and/or best practices on the subject.

I've, however, found one question about detecting that the client has changed.

Should I discover it by hand or does Angular provides some tooling to do so ?

The doc states this : In the interest of speed, the service worker doesn't wait to check for updates before it serves the application that it has cached.

Is there a way to circumvent that ?

1 Answers1

0

I think you can use ServiceWorker Update Service to check for client updates when the user open the webapp. You can also check for client updates frequently (link) if you want.

If a client update is present on the server you can force the user to "install" it and reload the page.

In the angular documentation there are some example if you open the links above

Ivan F
  • 1