Jboss caching angular fiìles

Viewed 16

I have an angular 13 application deployed in a war file under jboss and tomcat application server.

The users complains that every deploy of changes, they have to force a refresh of cached files with ctrl+f5 in browser to see the latest updates.

I build the angular application with --output-hashing=all flag, but still not working.

I'm not an expert of application servers, so I need some help.

Is there something to configure on the application server to force the download of the updated js/css dependencies of the angular web app?

Thanks for help

1 Answers

You could do a version check at the start of your application lifecycle, so that the version on the server correspond to the one in the client. If the client does a mismatch with the current version being different from the one on the server, force a window reload like this:

window.location.reload(true)
Related