Is it possible to prevent a browser from caching an ASPX page?
Submitted by: AdministratorJust 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.
Submitted by: Administrator
<%@ 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.
Submitted by: Administrator
Read Online ASP.Net Job Interview Questions And Answers
Top ASP.Net Questions
☺ | What event handlers can I include in Global.asax? |
☺ | What are user controls and custom controls? |
☺ | What methods are fired during the page load? Init() |
☺ | What is the difference between Response.Write() and Response.Output.Write()? |
☺ | Which template must you provide, in order to display data in a Repeater control? |
Top Dot Net Technologies Categories
☺ | MSF Interview Questions. |
☺ | .Net Architecture Interview Questions. |
☺ | ASP.Net MVC Interview Questions. |
☺ | Entity Framework Interview Questions. |
☺ | C# (Sharp) Programming Language Interview Questions. |