I have a button on a view, which on submit directs the user's browser back to the previous page using window.history.go(-1);
. This is necessary for us to maintain session data to display the previous view correctly.
My question is, is it possible for us to determine whether there is any browser history using jQuery so that if there is none we can instead redirect the user with
window.location = "/Transaction/Index";
to the correct page?
Thanks in advance!