Cache control: Expires Absolute (VB.net) : Response Cache « Response « ASP.Net






Cache control: Expires Absolute (VB.net)

<%@ Page Language="vb" %>
<html>
   <head>
      <title>Cacheing Output in ASP.NET</title>
      <script runat="server">
         Sub Page_Load()
            Response.CacheControl = "Public"
            Response.ExpiresAbsolute = DateTime.Now.AddSeconds(30)
            Message.Text = Now.ToString()
         End Sub
      </script>
   </head>
<body>
   <asp:label id="Message" runat="server"/>
</body>
</html>
           
       








Related examples in the same category

1.Removing cache items (VB.net)
2.Change Http Cache Policy (VB.net)
3.Cache control: Expires (VB.net)