How to make an ASPX Page Become non-backable??

  • Thread starter Thread starter RC
  • Start date Start date
R

RC

Hi,

How to make a Page Become time expired when user press back button?
Any Sample Code or reference provided?

Thanks
RC
 
RC said:
Hi,

How to make a Page Become time expired when user press back button?
Any Sample Code or reference provided?

There's no guarantee that a browser applies caching or expiration
instructions to locally stored pages. Still, for most browsers this
does work.

Either set the OutputCache directive on your page(s)

<%@ OutputCache Location="None" %>

or set the Cache property of the HttpResponse in your code-behind class:

Response.Cache.SetCacheability(HttpCacheability.NoCache);

(which is equivalent to the directive shown above)

Cheers,
 
Back
Top