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 custom attribute?

978


Describe the differences between the lifecycles of Windows services and Standard EXE?

1207


What is jade template engine?

1049


What are session objects?

1006


Will session work if cookies is disabled?

1023


Explain exception filters?

1040


Define globalization and localization.

995


What is the use of HttpHandlers? When to use this?

1118


How can you implement encapsulation in asp.net?

13073


How to prepare culture-specific formatting in .net.

1031


What is a form tag?

883


What is a global postback url?

959


What is in a session cookie?

979


Can any body provide me the sample web application in asp.net

1970


Why would anyone need to implement their own hashtable or linked list?

2987