My application disables caching on the browser via responses headers and then uses the Post-Redirect-Get pattern to enable the back button to "re-Get" the current page.
However on retesting this now with Firefox 12 and IE 8 I'm not seeing the results I was expecting (or that I had seen before with IE 6).
Upon selecting the back button I can see that the browser is attempting to perform the original request (the Post), not the redirected request (the Get). When I look at the requests on the network tab of Firebug I see the following:
Looks like the browser is treating the Post and Get as the same request and hence selecting the back button is re-submitting the Post:
I am using JSF, but I think this is a browser issue. Does anyone know why the browser is not performing a get of the redirected page?
It's working fine. The back button re-executes the request before "POST accountDetails.xhtml" which is not listed in your 1st screenshot, but is according the 2nd screenshot apparently (and logically) a "GET accountDetails.xhtml". You're apparently in the bean associated with that view or in some filter doing some checks and redirecting to "registrationWelcome.xhtml". The "POST accountDetails.xhtml" in the 1st screenshot is the current request which has been redirected to "reviewInfo.xhtml".
The back button does not re-execute the redirect. It's your own code which did it. The back button does also not re-execute the POST request, which is confirmed in the 2nd screenshot.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With