Is it possible to prevent a browser from caching an ASPX
page?

Answer Posted / swapna

Just call SetNoStore on the HttpCachePolicy object exposed
through the Response object's Cache property, as
demonstrated here:

<%@ Page Language="C#" %>

<%
Response.Cache.SetNoStore ();
Response.Write (DateTime.Now.ToLongTimeString
());
%>


SetNoStore works by returning a Cache-Control: private, no-
store header in the HTTP response. In this example, it
prevents caching of a Web page that shows the current time.

Is This Answer Correct ?    3 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Explain serialization and deserialization?

547


What is the difference between session and application?

506


How Session outproc in Sqlserver stored?

2306


What is server components?

538


How do active server pages work?

548






Explain exception filters?

589


Where session variables are stored?

543


What does asp in asp.net stand for?

523


What is the use of data set in asp.net?

491


In Code-Behind class which kind of code (server or client) is found ?

597


Define cookie.

568


What are the asp.net server side objects?

521


What are the asp.net list controls and difference between them?

516


which one is more flexibility and reliability and durability asp.net (VS)php which one is best and which one we do nice to create dynamic websites

1674


Do cookies store passwords?

505