Is there a way to prevent Chrome from restoring the session when reopening a closed page? Possibly using a special header?
My company app relies heavily on user state, and I need to log employees out and delete all relevant data if they are inactive for 60 minutes. The issue is that Chrome automatically reopens the page exactly where it was left off, making it difficult for my website to detect the inactivity. The setTimeout function won't trigger until another 50 minutes pass.
I've considered some unconventional solutions but would prefer a method to instruct Chrome not to restore old sessions and instead treat each opening as a fresh start. Perhaps disabling caching through JavaScript could work?
Edit: I am serving the Angular 9 static HTML and JavaScript using IIS.