In the below servlet A i am able to get the no cache to work so when i hit the back button the page is expired.
I am using this same exact code in another servlet. The only differenc i can think of is the i am using the PRG patten with it. So i do a process then it redirects to servlet B and displays the invoice page. However if i hit back from here the page is not expired and will still display.
[ December 06, 2008: Message edited by: John Schretz ]
[ December 06, 2008: Message edited by: John Schretz ] [ December 06, 2008: Message edited by: John Schretz ]
As you are aware, the whole point of the PRG pattern is to prevent double submit when you refresh the result page after a post request. Hence using a redirect instructs the browser to initiate a brand new request. So you are not getting a "page expired" error message anymore when you go back to the previous page which is not been cached by the browser.
I think this is what is happening. However, the more knowledgeableand very helpful folks here will probably have a better explanation. [ December 06, 2008: Message edited by: Bosun Bello ]
Bosun (SCJP, SCWCD)
So much trouble in the world -- Bob Marley