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.
Showing posts with label HttpCachePolicy. Show all posts
Showing posts with label HttpCachePolicy. Show all posts
Thursday, March 12, 2009
Subscribe to:
Posts (Atom)
About Me
- Wajid Ansari
- Hyderabad, Andhra Pradesh, India
- I'm a MCA graduate working as a Web Developer.