devxlogo

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

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.

See also  Why ChatGPT Is So Important Today
devxblackblue

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.

About Our Journalist