Cache problems - old versions stay for a long time

Hello, so I have a little problem with caching my website.

Sometimes, the old version of my website cache of my SPA React APP stays for weeks, before the user manually cleares the cache and reload the page. How to prevent this?

hi there, you might find this interesting! you can actually set a header that instructs us to cache (or not to cache) according to your wishes.

you might also take a look as to whether you are using a service worker: