Reputation: 1448
I have web application with spring-security. To some pages I have configured anonymous access So the flow is like:
indexPage --> firstPage --> secondPage -- thirdPage
To all this pages I can access straight by entering url in browser or by pressing "Next" button on previous page. However when I click browser back button, I've been redirecting to indexPage doesn't metter in which page I currently stay. How can I avoid such behavior?
Thanks
PS
Next button makes json request
$.getJSON("/home/<some_address>.json?mail="+email, function(data) {
if(data.success)
{
console.log("Data ok!");
window.location.replace("/home/<next_page>.html?mail="+email);
}else{
//handle error
}
});
Upvotes: 0
Views: 189
Reputation: 1448
The issue was window.location.replace()
should be window.location = ""
Upvotes: 1