Is it possible to prevent a browser from caching an ASPX
page?
Answer Posted / 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 |
Post New Answer View All Answers
What is IPostBack? How to use it?
What are the cookies types in asp.net?
Explain the difference between webfarm and webgardens in .net?
What is synchronous and Asynchronous post back ?
How many types of cookies are there in asp.net?
Explain the difference between asp & asp.net.
Explain what benefit does your code receive if you decorate it with attributes demanding specific security permissions?
while developing webservices if i want some users to use my webservice only how can i give security to my webservice?
What are the new features implemented in ASP.NET?
What are demand-paging and pre-paging?
What is ASLM?
Explain what does mvc represent in asp.net? : asp.net mvc
What is base class of .net?
Difference between response.redirect and server.transfer?
how to implement some securty aspect in our application i.e 1.cookie poisioning. 2.data encryption. 3.forcefull browsing 4.sql/code injection 5.securing web app by using web services ........my question is how to implement these thing in our application is this done by hard coding or by help of some tool