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 / 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



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is Cookies Less Session?

1034


What is server components?

1015


What can you do with asp.net?

917


When maintaining session through sql server, what is the impact of read and write operation on session objects?

966


Which validator control you use if you need to make sure the values in two different controls matched?

1059


Web API uses which library for JSON serialization?

1049


If you are using components in your application, how can you handle exceptions raised in a component?

2652


How do u declare static variable and how it is declared and what is its lifetime?

1016


Explain how viewstate is being formed?

954


How is a session stored and maintained in asp.net?

984


State differences between MVC and WebAPI

1115


What are the built-in objects in asp.net?

984


What are the advantages and disadvantages of session?

1101


Explain the page lifecycle of an asp.net mvc? : asp.net mvc

855


How can we make sure that Web API returns JSON data only?

1000