I have a webapp in which i am sending a token every time to server to prevent CSRF, which works fine. In case there is no token present in request or an invalid token the server rejects the request. This works fine.
In some places i have a back button which where i am using windows.history.back() to go to previous page. Problem is it sends previous URL to the server with the previous token which is invalid. Hence server rejects it. Is there a way to set a new token in the windows.history.back() ?? or some other ideas to do this ??