Ask a Question related to ASP.NET General, Design and Development.
-
Kevin Spencer #1
Re: Warning Page Has Expired, I need to turn it OFF for a simple search page
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
[url]http://www.takempis.com[/url]
Some things just happen.
Everything else occurs.
"Mike" <mikenospam@com.nospam> wrote in message
news:uf9eWLNRDHA.2768@tk2msftngp13.phx.gbl...and> 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 buttonworks> get "Warning Page Has Expired". On other pages in the same site back> 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));
>
>
>
>
>
Kevin Spencer Guest
-
Warning: Page has Expired
Hi, I get the following message when the back-button is clicked "Warning: Page has Expired". This message only appeared after I used the following... -
Page Has Expired Message in between the php Page When I click Back in Explorer Menu
Could anyone please help me on this?? I have a php script page, which is basically quiz. Visitors (after login in with their email address) are... -
Page has expired -problem
Hi! I have Windows XP&IE6.0.2... (SP1). I'm coding one project with PHP. I get "Warning: Page has Expired" when I try to get back to the "POSTed... -
[PHP] Warning - Page has expired error
Use get instead of post. for the request method. Then please make sure that you are not sending any expires headers in your code. all the best ... -
Prevent 'Page has expired' when a client hits back to return to a search page
I have a search page that I want to enable private caching so that when a user hits the back button they dont get the page has expired error. I... -
Mike #2
Re: Warning Page Has Expired, I need to turn it OFF for a simple search page
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" <kevin@SPAMMERSSUCKtakempis.com> wrote in message
news:#9PJduURDHA.3880@tk2msftngp13.phx.gbl...for> 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 requestonly> a page. If that page was returned by some server-side form handler, thelinks> 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
> [url]http://www.takempis.com[/url]
> Some things just happen.
> Everything else occurs.
>
> "Mike" <mikenospam@com.nospam> wrote in message
> news:uf9eWLNRDHA.2768@tk2msftngp13.phx.gbl...> > I have a simple search on a page, when you search a list of regularthis> and> > come up, you click a like look at the info and then hit the back button> works> > get "Warning Page Has Expired". On other pages in the same site back> > 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>> > 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));
> >
> >
> >
> >
> >
>
Mike Guest
-
Cheung, Jeffrey Jing-Yen #3
Re: Warning Page Has Expired, I need to turn it OFF for a simplesearch page
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" <kevin@SPAMMERSSUCKtakempis.com> wrote in message
> news:#9PJduURDHA.3880@tk2msftngp13.phx.gbl...
>>>>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
>>[url]http://www.takempis.com[/url]
>>Some things just happen.
>>Everything else occurs.
>>
>>"Mike" <mikenospam@com.nospam> wrote in message
>>news:uf9eWLNRDHA.2768@tk2msftngp13.phx.gbl...
>>>>>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));
>>>
>>>
>>>
>>>
>>>
>>
>Cheung, Jeffrey Jing-Yen Guest



Reply With Quote

