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 are the types of session in asp.net?
If I have more than one version of one assemblies, then how will I use old version (how/where to specify version number?) In my application?
What permissions do asp.net applications posses by default?
Explain about Multi-Language integration?
How will you do windows authentication and what is the namespace? If a user is logged under integrated windows authentication mode, but he is still not able to logon, what might be the possible cause for this? In ASP.Net application how do you find the name of the logged in person under windows authentication?
How to implement Authentication and Authorization?
Difference between singleton and singlecall.
Is it possible to change the index of primary key on table?
Explain how is the asp.net mvc architecture different from others? : asp.net mvc
Explain the difference between debug.write and trace.write?
Why we use asp.net for website development?
Explain how can we inherit a static variable?
What is form submit?
What is postback pixel?
How many types of Cookies are available in ASP.NET?