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

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

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.
 
put a unique/random parameter in the querystring for each page call.
It will be interpreted as a new address and served fresh.
 
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...
 
Back
Top