Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Re: Warning Page Has Expired, I need to turn it OFF for a simple search page

Reply
Thread Tools

Re: Warning Page Has Expired, I need to turn it OFF for a simple search page

 
 
Kevin Spencer
Guest
Posts: n/a
 
      07-08-2003
You can't turn it off. If you understand the reason for it, then you know
that the Back button or Refresh button of a browser makes a new request for
a page. If that page was returned by some server-side form handler, the only
way to get that page back is to re-submit the form that the handler
processed to produce the page. There are some workarounds for it, but they
all involve not posting a form to get the page, such as changing the
location property of the document, rather than doing a PostBack.

HTH,

Kevin Spencer
Microsoft FrontPage MVP
Internet Developer
http://www.takempis.com
Some things just happen.
Everything else occurs.

"Mike" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> I have a simple search on a page, when you search a list of regular links
> come up, you click a like look at the info and then hit the back button

and
> get "Warning Page Has Expired". On other pages in the same site back

works
> fine as long as a form has not been posted.
>
> I understand the reason for this and also have read many post on this
> subject, but I still cannot figure out how to turn this off for just this
> one page.
>
> I have tried:
>
> <%@ OutputCache VaryByParam="value" Duration=180 Location="Client" %>
>
> and
>
> Context.Response.Cache.SetCacheability(HttpCacheab ility.Private);
>
> Context.Response.Cache.SetExpires(DateTime.Now.Add Seconds(180));
>
>
>
>
>



 
Reply With Quote
 
 
 
 
Mike
Guest
Posts: n/a
 
      07-08-2003
Requiring a repost makes sense in many cases, but not in others, my search
is a good example: A list of product apears, you click one and hyperlink to
see it and then click your back button. I simply dont care if the browser
displays the page after the post was done, actually I want that behavior.
Why force the client to re-run the same search, or click some special back
button that displays some cache of their search.

Am I going about this the wrong way?

If there is really no way to turn this off on a case by case basis, that
really stinks, but there has got to be a way, somebody has to have figured
this out.

Thanks

Mike


"Kevin Spencer" <(E-Mail Removed)> wrote in message
news:#(E-Mail Removed)...
> You can't turn it off. If you understand the reason for it, then you know
> that the Back button or Refresh button of a browser makes a new request

for
> a page. If that page was returned by some server-side form handler, the

only
> way to get that page back is to re-submit the form that the handler
> processed to produce the page. There are some workarounds for it, but they
> all involve not posting a form to get the page, such as changing the
> location property of the document, rather than doing a PostBack.
>
> HTH,
>
> Kevin Spencer
> Microsoft FrontPage MVP
> Internet Developer
> http://www.takempis.com
> Some things just happen.
> Everything else occurs.
>
> "Mike" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
> > I have a simple search on a page, when you search a list of regular

links
> > come up, you click a like look at the info and then hit the back button

> and
> > get "Warning Page Has Expired". On other pages in the same site back

> works
> > fine as long as a form has not been posted.
> >
> > I understand the reason for this and also have read many post on this
> > subject, but I still cannot figure out how to turn this off for just

this
> > one page.
> >
> > I have tried:
> >
> > <%@ OutputCache VaryByParam="value" Duration=180 Location="Client" %>
> >
> > and
> >
> > Context.Response.Cache.SetCacheability(HttpCacheab ility.Private);
> >
> > Context.Response.Cache.SetExpires(DateTime.Now.Add Seconds(180));
> >
> >
> >
> >
> >

>
>



 
Reply With Quote
 
 
 
 
Cheung, Jeffrey Jing-Yen
Guest
Posts: n/a
 
      07-08-2003
Mike,

This has nothing to do with caching, rather just the way your form
interprets posted data. If you're enabling viewstate (expensive), then
this should resolve any "forced refreshes" as the posted data should be
remembered in the viewstate data.

HTH,

Jeff Cheung

Mike wrote:

> Requiring a repost makes sense in many cases, but not in others, my search
> is a good example: A list of product apears, you click one and hyperlink to
> see it and then click your back button. I simply dont care if the browser
> displays the page after the post was done, actually I want that behavior.
> Why force the client to re-run the same search, or click some special back
> button that displays some cache of their search.
>
> Am I going about this the wrong way?
>
> If there is really no way to turn this off on a case by case basis, that
> really stinks, but there has got to be a way, somebody has to have figured
> this out.
>
> Thanks
>
> Mike
>
>
> "Kevin Spencer" <(E-Mail Removed)> wrote in message
> news:#(E-Mail Removed)...
>
>>You can't turn it off. If you understand the reason for it, then you know
>>that the Back button or Refresh button of a browser makes a new request

>
> for
>
>>a page. If that page was returned by some server-side form handler, the

>
> only
>
>>way to get that page back is to re-submit the form that the handler
>>processed to produce the page. There are some workarounds for it, but they
>>all involve not posting a form to get the page, such as changing the
>>location property of the document, rather than doing a PostBack.
>>
>>HTH,
>>
>>Kevin Spencer
>>Microsoft FrontPage MVP
>>Internet Developer
>>http://www.takempis.com
>>Some things just happen.
>>Everything else occurs.
>>
>>"Mike" <(E-Mail Removed)> wrote in message
>>news:(E-Mail Removed)...
>>
>>>I have a simple search on a page, when you search a list of regular

>
> links
>
>>>come up, you click a like look at the info and then hit the back button

>>
>>and
>>
>>>get "Warning Page Has Expired". On other pages in the same site back

>>
>>works
>>
>>>fine as long as a form has not been posted.
>>>
>>>I understand the reason for this and also have read many post on this
>>>subject, but I still cannot figure out how to turn this off for just

>
> this
>
>>>one page.
>>>
>>>I have tried:
>>>
>>><%@ OutputCache VaryByParam="value" Duration=180 Location="Client" %>
>>>
>>>and
>>>
>>>Context.Response.Cache.SetCacheability(HttpCach eability.Private);
>>>
>>>Context.Response.Cache.SetExpires(DateTime.Now. AddSeconds(180));
>>>
>>>
>>>
>>>
>>>

>>
>>

>
>


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to turn off those warning messages during ant build? zyng Java 34 05-07-2012 04:33 PM
Is there a way to permanently turn off the Windows Thumbs.db warning? Sharon Digital Photography 4 05-26-2008 04:50 AM
How to turn off low disk space warning ? DaveF Computer Support 3 04-26-2006 01:10 AM
Turn off security warning? Captain Infinity Firefox 2 05-23-2005 02:12 PM
XP _How do I Turn-off Firewall Warning Mike Computer Support 4 04-24-2005 01:10 AM



Advertisments