Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Page Expired when Back Button is used, how do you do this

Status
Not open for further replies.

crmayer

Programmer
Nov 22, 2002
280
US
I am trying to make a page expire when the user tries to go back to it in IE. I do not want them to be able to get back to the form and resubmit it or see the information that they just entered into it. I have seen this on banks web sites and what I would call secure sites, but I can not find out how to do this. I have tried ALL the meta tags that eveybody sugests and none of them work. Any ideas as to what I can to?
 
I have tried that, thanks though. The meta tags do not seem to work at all in IE. I found that US Bank does this. It returns a page that says:
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 sercurity precaution, Internet Explorer does not automatically resubmit your information for you.

To resubmit your information and view this Web page, click the refresh button.

There is some Javascript to make the refresh button reload the page.

Any more ideas?
 
I submit the form with the POST method.

Thanks for the help, I hope you have some ideas.
 
Hi mate,

What you are trying to do happens by default in IE, I'm not sure about other browsers.

This does not prevent you from going back to re-submit your info, it prevents you from clicking back and viewing a page that was shown as the result of a form. The reason for this is for the browser to display that page again, it needs to re-submit the form.

One workaround to stop a user clicking back to the form would be to call that form page with another form.

Hope this helps Wullie

- Send your e-mail to santa!! [santa]

The pessimist complains about the wind. The optimist expects it to change.
The leader adjusts the sails. - John Maxwell
 
I have a javascript function here that will reload the page with no values in the fields. If the user has to refresh the page it will reload it with the default values. This is what I want, currently when the user clicks the back button everything is there, I do not get the Page Expired message and I would like to.
 
Hi mate,

You mis-understand what I said.

Fill in your form, click submit. Now click on a link to another page. Click back, you should now get the message.

Clicking back from the output shows the form page again, this has no submitted data as this page is the form, not the output. That is why you are not seeing the message.

Hope this helps Wullie

- Send your e-mail to santa!! [santa]

The pessimist complains about the wind. The optimist expects it to change.
The leader adjusts the sails. - John Maxwell
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top