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?

Answers were Sorted based on User's Feedback



Is it possible to prevent a browser from caching an ASPX page?..

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

Is it possible to prevent a browser from caching an ASPX page?..

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

Is it possible to prevent a browser from caching an ASPX page?..

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

Post New Answer

More ASP.NET Interview Questions

What is the use of SmartNavigation property?

4 Answers  


What is three major points in WCF?

9 Answers   Syntel,


Explain how to prepare culture-specific formatting in .net.

0 Answers  


Difference between mvc2 and mvc3 in asp.net?

4 Answers   Wipro,


where is declare global variable in asp.net and what is use of global variable

3 Answers  


Explain the main function of razor in asp.net? : asp.net mvc

0 Answers  


I have a webform in asp.net.In that webform there is 2 division class(DIV).in one of the div class there is a text box for enter the id & a button for to check id with database value.My doubt is that how can i appear the 2nd Div contents only when the id is true with database value.if wrong do not display the div . i Want code in c#.

2 Answers  


What are the merits and demerits of viewstate?

0 Answers   Siebel,


When does a session actually start?

0 Answers  


What are the asp.net objects? is it application obects, cache objests etc. or is it state managements, web services etc?

3 Answers   Syntel,


How do you declare static variable?

0 Answers  


What are session state modes? List some of the important session state modes of asp.net.

0 Answers  


Categories