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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to get rid of Web Page Has Expired error message

Status
Not open for further replies.

GhostWolf

Programmer
Jun 27, 2003
290
US
All of a sudden several of our browsers, (IE 8), have begun showing this error message when the Back button is clicked. Not all of them have, though. All of the browsers are concurrently navigating a test copy of a site I'm working on.

The first page of the site requests user input. Upon validation, a panel opens to display information - plus buttons and links that lead to other pages on the site. Clicking the Back button from any of those pages may lead to this message.

It's imperative that the user be able to return to this "front page".

Part of the error message says that "the website requires that you download it again." All I really need it to do is to redisplay the same page. Is there a way I can force it to do that?

One bit of information I found mentioned a "cache-control" directive, but it's not in use anywhere on this site.
 
yes, I have seen this before with webforms. It has to do with the submission and rendering of the page being part of the same request. it happens like this
Code:
Page_Load
{
   if not postback
       present data
}

Button_Click
{
   update database
   present data (or redirect to another page)
}
at this point clicking back would cause the page to submit again, the the browser knows the request is stale so you are presented with this message.

One way to avoid this is to use the concept post-get-redirect. With MVC it's natural to use this concept. I'm not sure how to implement this with webforms though.

Hopefully this provides some insight into why it's happening.

Jason Meckley
Programmer

faq855-7190
faq732-7259
 
Jason explained it quite well. Your best option is to create a link that redirects them to your "front" page instead of the back button. This may not seem natural to your users at first, but with training and some time they will get used to it.
 
Looks like I'll need to do some more studying, then, to figure out how to redirect to the "front" page while maintaining the data that's being displayed there.
 
As I told you in one of your ealier posts, do not rely on the browser's back and forward buttons. They will most likely behave differently between browsers. Code the navigation yourself.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top