I’m using following line of code to disable the browser back button problem after logout.
function LogoutOnClick() {
window.history.go(-1);
}
But, there is one problem with this code, supposing I’ve three page first is login page(login.cshtml) and second successfully logged in page(home.cshtml) and third page is about page (about.cshtml),
now I do login then it will redirect me on home.cshtml page now that I move on the third page about.cshtml and after that I do logout from about.cshtml page, it redirects me on login.cshtml page.
And now if I clicked on browser back button then redirects me on about.cshtml page again but there user couldn’t change or add anything.
So let me know is there any appropriate code or method to resolved this problem.