devxlogo

How To Ensure That the Page is not Cached

How To Ensure That the Page is not Cached

Setting Response.Expires to a negative number or 0 disables caching. Sometimes, the use of Response.Expires = -1 doesn’t work because of mismatches between the clocks on the server and the browsers. Be sure to use a large negative number, a little more than a day (1440), to work around those mismatches.
Example:

 Response.Expire = -1441

size=3>
Here are the commands to place at the top of your ASP scripts, to ensure that the page is not cached: size=3>

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