• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Warning : Page Expired on clicking Back

 
sreenath reddy
Ranch Hand
Posts: 415
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi
I am facing a scenario which is popular across many web applications .. I have a form which submits a few fields on clicking a button . Submitting the form will take it to another view and clicking Back from there will give me the IE page saying Page Expired, Click refresh to submit again.

I know that its coming because of the form using POST method , but how can i avoid this is the best possible way ..

One solution which i am familiar is , after submitting use a redirect than forward so that URL gets updated as GET and clicking back won't cause any issues. IN this case i will be loosing the request varibles and thus it becomes tough to show the error messages

can any one let me know if there is a better solution ??
 
Stan James
(instanceof Sidekick)
Ranch Hand
Posts: 8791
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I feel your pain on losing the request object. I have done this by putting the message on the URL of the redirect, but it shows in the address bar in the browser which may or may not be ok.
 
srilatha kareddy
Ranch Hand
Posts: 32
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i can suggest one thing....

u can control back button using javascript there u can write code

one trick is
javascript:window.history.forward(1);
[ March 01, 2006: Message edited by: srilatha reddy ]
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64178
83
IntelliJ IDE Java jQuery Mac Mac OS X
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
srilatha reddy, JavaRanch is a community of people from all over the world, many of who are not native English speakers. While using abbreviations like "u" instead of spelling out "you" is convenient when text messaging your friends on a cell phone or in a chat room, it presents an extra challenge to those that are already struggling with English. Additionally, such shortcuts may confound automated translation tools that patrons of the Ranch may be making use of.

I would like to ask for your help in making the content of JavaRanch a little easier to read for everybody that visits here by not using such abbreviations.

Please read this for more information.
 
sreenath reddy
Ranch Hand
Posts: 415
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi stan

I appreciate your suggestion but any other better way for doing that as it will expose the error message in the URL
 
Consider Paul's rocket mass heater.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic