Home All Groups Group Topic Archive Search About

ASP.Net 2.0 programmatically forcing page re-load from the server

Author
8 Oct 2006 12:14 PM
Sergey Poberezovskiy
Hi,

I have an application where I need to ensure that users do not use browser
navigation buttons. I specifically warn the users, and in every page set the
folllowing:
  Me.Response.Cache.SetNoStore()
  Me.Response.Cache.SetNoServerCaching()
  Me.Response.Cache.SetCacheability(System.Web.HttpCacheability.NoCache)
and issue a GUID for every page. Then on page load I check whether the GUID
passed from the last page is the same as in Session, and display an error
message othewise. All works - in development.
However, in production (the site is deployed to a web hosting company),
using navigation buttons in IE do not force re-load from the server, and
therefore do not trigger the error. It works without any hiccups with
Netscape & Mozilla, both in development and production.

Any help on how to force IE to re-load the page, or why
Response.Cache.SetNoStore() stores page in IE history is greatly appreciated.

Author
9 Oct 2006 5:24 PM
Jon Paal
put a unique/random parameter in the querystring for each page call.
It will be interpreted as a new address and served fresh.


Show quoteHide quote
"Sergey Poberezovskiy" <SergeyPoberezovs***@discussions.microsoft.com> wrote in message
news:3E569CCC-0135-4FFC-9650-4ECA2ED50250@microsoft.com...
> Hi,
>
> I have an application where I need to ensure that users do not use browser
> navigation buttons. I specifically warn the users, and in every page set the
> folllowing:
>  Me.Response.Cache.SetNoStore()
>  Me.Response.Cache.SetNoServerCaching()
>  Me.Response.Cache.SetCacheability(System.Web.HttpCacheability.NoCache)
> and issue a GUID for every page. Then on page load I check whether the GUID
> passed from the last page is the same as in Session, and display an error
> message othewise. All works - in development.
> However, in production (the site is deployed to a web hosting company),
> using navigation buttons in IE do not force re-load from the server, and
> therefore do not trigger the error. It works without any hiccups with
> Netscape & Mozilla, both in development and production.
>
> Any help on how to force IE to re-load the page, or why
> Response.Cache.SetNoStore() stores page in IE history is greatly appreciated.
>
Author
9 Oct 2006 11:31 PM
Sergey Poberezovskiy
Jon,

Thank you for your reply. That was exactly what I did: I put the generated
GUID into QueryString to differentiate between pages. As I said, it did work
for me in development for IE as well as other browsers - it did not work (for
a couple of days) after I deployed the site to production - to the external
ISP.
Anyhow, now the problem disappeared - works as expected in IE (in
production) as well. I just do not like when things like this happen - when
problem appears out of nowhere and goes without any visible reason. Wierd...

Show quoteHide quote
"Jon   Paal" wrote:

> put a unique/random parameter in the querystring for each page call.
>  It will be interpreted as a new address and served fresh.
>
>
> "Sergey Poberezovskiy" <SergeyPoberezovs***@discussions.microsoft.com> wrote in message
> news:3E569CCC-0135-4FFC-9650-4ECA2ED50250@microsoft.com...
> > Hi,
> >
> > I have an application where I need to ensure that users do not use browser
> > navigation buttons. I specifically warn the users, and in every page set the
> > folllowing:
> >  Me.Response.Cache.SetNoStore()
> >  Me.Response.Cache.SetNoServerCaching()
> >  Me.Response.Cache.SetCacheability(System.Web.HttpCacheability.NoCache)
> > and issue a GUID for every page. Then on page load I check whether the GUID
> > passed from the last page is the same as in Session, and display an error
> > message othewise. All works - in development.
> > However, in production (the site is deployed to a web hosting company),
> > using navigation buttons in IE do not force re-load from the server, and
> > therefore do not trigger the error. It works without any hiccups with
> > Netscape & Mozilla, both in development and production.
> >
> > Any help on how to force IE to re-load the page, or why
> > Response.Cache.SetNoStore() stores page in IE history is greatly appreciated.
> >
>
>
>