Re: Browser Back button problem

From: Joerg Jooss (news-reply_at_joergjooss.de)
Date: 02/25/05


Date: Fri, 25 Feb 2005 07:57:55 -0800

Nick Goloborodko wrote:

> Hi,
>
> I can see what you mean - but most likly this is the problem with the
> user's end browser, and not your app. As i am coming from PHP
> background, it was allways concidered a good programming style to
> disable any catching done by the browser / proxy server in HIGH
> security applications. What normally happens when the user presses
> back button is that the last page is brought up by the browser
> without even sending a request to server.

Which BTW is what the HTTP spec expects a browser to do.
 
> However this generally can be fixed by using HTPP headers
> "Cache-Control: no-cache, must-revalidate" and "Pragma: no-cache".
> Since i'm only begginging ASP.NET i cannot help u with the name of
> the function that manages HTTP headers in .NET, but i can assure u
> that there is one. Also, do read more on Cache-Control: and Pragma:
> HTTP headers (Google it)

See System.Web.HttpCachePolicy or the @OutputCache directive.

Cheers,

-- 
http://www.joergjooss.de
mailto:news-reply@joergjooss.de

Quantcast