• Post Reply Bookmark Topic Watch Topic
  • New Topic

Caching Problems with borwsers.  RSS feed

Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,
I have a requirenent in my project where i have some screen for the user to fill in the data and stote them in the database.Now the problem is that in the biginning i present an empty form to the user(page 1 in browser) , the user fills in the data and hits on the save button, i save the data in a table and again show the same form to the user but this time filled in with the data he/she had wanted to save(page 2 in browser). Now what the user does is he/she presses the back button of the borwser and goes back to page 1 and sees the same empty form again.
To avoid this i used the following segemnt of code in my JSPs.......
response.addHeader("Pragma", "NoCache");
response.addHeader("Cache-Control", "no-cache");
response.addDateHeader("Expires", 1);
This works , but now when the user presses the back button after saving the record he/she gets the following warning page....
Warning: Page has Expired The page you requested was created using information you submitted in a form. This page is no longer available. As a security precaution, Internet Explorer does not automatically resubmit your information for you.
To resubmit your information and view this Web page, click the Refresh button.
Is there any more decent way to achieve this , so that the page 1 is removed from the history entirely..
Shiny ad:
Rocket Oven Kickstarter - from the trailboss
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!