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 |
With out Web.config can we executes the application?
What is a pixel url?
How do you change the session time-out value?
0 Answers TryTechnicals Pvt Ltd,
How to authenticate users using Web.Config ?
Define the term Web Garden?
0 Answers Sans Pareil IT Services,
What is Dynamic Web and discuss its usage with the help of real life examples?
Asp pages that worked pefectly on windows 2000 server and iis 5.0 do not work on windows 2003 server with iis 6.0. Asp.net pages work fine. Why?
Explain the main function of razor in asp.net? : asp.net mvc
How do you declare static variable?
What is the mvc model?
What methods are fired during the page load? Init()
what is Impersonation
3 Answers Alliance One, Task Informatics,