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
What is Cookies Less Session?
What is server components?
What can you do with asp.net?
When maintaining session through sql server, what is the impact of read and write operation on session objects?
Which validator control you use if you need to make sure the values in two different controls matched?
Web API uses which library for JSON serialization?
If you are using components in your application, how can you handle exceptions raised in a component?
How do u declare static variable and how it is declared and what is its lifetime?
Explain how viewstate is being formed?
How is a session stored and maintained in asp.net?
State differences between MVC and WebAPI
What are the built-in objects in asp.net?
What are the advantages and disadvantages of session?
Explain the page lifecycle of an asp.net mvc? : asp.net mvc
How can we make sure that Web API returns JSON data only?