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
Diff between web user control and web custom control?
Where do the cookie state and session state information be stored?
What is a postback in asp net?
Explain about Application and Session Events ?
Explain the difference between singleton and single call?
What is OSI layer? Explain different layers.
What is state management technique?
Why is string called immutable data type?
Explain the steps to be followed to use passport authentication.
is there any third party tools are using in .net technologies? what are there ? give me the brief introduction?
What do you mean by caching in asp.net?
How would you enable impersonation in the web.config file?
How can we inherit a static member?
What is a user session?
How is mvc different from asp.net? : Asp.Net MVC