Is it possible to prevent a browser from caching an ASPX
page?
Answers were Sorted based on User's Feedback
Answer / manoj
Write this code in the Page load event of the code behind :-
Response.Cache.SetCacheability(HttpCacheability.NoCache);
Is This Answer Correct ? | 5 Yes | 2 No |
Answer / 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 |
Answer / surendra singh
Just call SetNoStore on the HttpCachePolicy object exposed through the Response object's Cache property, as demonstrated here:
<%@ Page Language="C#" %>
<html>
<body>
<%
Response.Cache.SetNoStore ();
Response.Write (DateTime.Now.ToLongTimeString ());
%>
</body>
</html>
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 ? | 0 Yes | 0 No |
Why do we need url encoding?
Explain about asp.net caching?
Whats the difference between abstract factory pattern and factory pattern?
Is There any Third party tools are using in .Net Technologies? Can u Explain?
Which method has beenintroduced in asp.net 4.0 to redirect a page permanently?
What is the difference between Hash table and Array list?
What is ASLM?
When using the Pager object, inorder to know which page to go, which property you have to set to grid?
What is Web Server Control Templates.?
what is the Difference between Dim Object as object AND dim obj as myform?
Define transparent caching with aop?
In cache where dats is stored and how(file or object?)