Brower Back button question
Posted on 2006-11-04
Is there a way that a PAGE can tell which PAGE the user navigated from by licking the back button from the brower.
I tested both request.servervariables("HTTP_REFERER") in ASP and request.getheader("REFER") in jsp, both does not working in case of Back button navigation instead of a real request --- it's understandable.
A link to certain page is clicked out side of a J2EE application and the application is handling the request by a typital servelet gateway and then redirected it to certain dedicate page (A.jsp) from there a FORM submit is made to final page(B.jsp)
I think it's a typical design, but since the redirect is made through the framework (submit ,etc), pressong back button from b.jsp can only goes back to the redirecting page A.jsp and then loop back to B.
obviously location.replace does not working as I tested, I am thinking to use location.go(-2) on the A.jsp but I need to know where the request is coming from to make the decision...
Any input is highly appreciated!