• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Liutauras Vilda
  • Campbell Ritchie
  • Tim Cooke
  • Bear Bibeault
  • Devaka Cooray
Sheriffs:
  • Jeanne Boyarsky
  • Knute Snortum
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Ganesh Patekar
  • Stephan van Hulst
  • Pete Letkeman
  • Carey Brown
Bartenders:
  • Tim Holloway
  • Ron McLeod
  • Vijitha Kumara

Caching Problems with borwsers.  RSS feed

 
Greenhorn
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..
Thanks
Yogesh
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!