Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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


Please Help Members By Posting Answers For Below Questions

What is the page life cycle in asp.net?

973


When was asp.net released?

1025


What is view state and how it works in asp net?

989


Explain an object, class and method.

1000


Explain how can we inherit a static variable?

1068


What are type/key pairs in client script registration? Can there be 2 scripts with the same type/key pair name?

946


What is aspect-oriented programming?

1110


Why web api is better than wcf?

1109


How to integrate angular 8 with asp.net mvc 5? : Asp.Net MVC

890


how to retrieve property settings from xml .config file.

997


What is request and response in asp.net?

963


How you will handle session when deploying application in more than a server?

1102


Describe briefly what is the role of IIS on an ASP.NET application? What does it for the same application?

1085


Explain asp.net web forms.

1088


Explain asp.net page life cycle?

1086