devxlogo

Make Sure That the Browser or Proxy Server Will Not Cache the Page

In general, the Expires property of the Response object can be used to “expire” the Web page. This prevents a browser or proxy server from caching the page. However, a more reliable way to do it involves sending additional headers with the HTML page:

  <%Response.Expires = 0Response.ExpiresAbsolute = Now () -  Response.AddHeader "pragma","no-cache"Response.AddHeader  "cache-control","private"Response.CacheControl = "no-cache"%>  

These additional headers will make sure that the browser or proxy server does not cache the page. It will also work on more systems than Response.Expires will by itself.

Charlie has over a decade of experience in website administration and technology management. As the site admin, he oversees all technical aspects of running a high-traffic online platform, ensuring optimal performance, security, and user experience.

See also  Five Early Architecture Decisions That Quietly Get Expensive

About Our Editorial Process

At DevX, we’re dedicated to tech entrepreneurship. Our team closely follows industry shifts, new products, AI breakthroughs, technology trends, and funding announcements. Articles undergo thorough editing to ensure accuracy and clarity, reflecting DevX’s style and supporting entrepreneurs in the tech sphere.

See our full editorial policy.