+ 2

How to prevent user from going back to home page (when clicking back button) after logout?

I have built a website consist of login, register and home page using node.js. I want to prevent the user from going back to home page right after logout using javascript. Is there any solution?

29th Jul 2022, 4:55 PM
Ray
Ray - avatar
5 Réponses
+ 2
Since the browser pulls that page from cache, it doesn't matter what you do on that page, unless you add a JS check to see if the user is still authenticated... but that doesn't solve the problem of the page being in cache. but this might help https://stackoverflow.com/a/24591864/217374
30th Jul 2022, 7:00 AM
takrim
takrim - avatar
+ 3
which authorization system you are using?
29th Jul 2022, 9:45 PM
takrim
takrim - avatar
+ 1
Thanks it's working takrim
30th Jul 2022, 9:35 AM
Ray
Ray - avatar
+ 1
Ray Welcome
30th Jul 2022, 10:02 AM
takrim
takrim - avatar
0
takrim passport js
30th Jul 2022, 6:28 AM
Ray
Ray - avatar