Open In App
Related Articles

ASP CacheControl Property

Improve Article
Save Article
Like Article

The ASP CacheControl Property is used to set whether a proxy server can cache the HTML Output or not which have been generated by the ASP The proxy servers configured to cache Web pages for faster response times. Basically,  ASP pages are developed to be unique for each user or may contain secure information. The Proxy server will not store a cached copy by default. 



Parameter Values: This property accepts a single parameter as mentioned above and described below:

control_header: It specifies a cache-control Header which can be further set to two Values-The values for CacheControl are strings and must be enclosed in quotation marks (” “). 

  1. Public: It specifies a type of cache That is shared with any users. Such as proxy servers, will cache pages with this setting.   
  2. Private: It has a default value. It only shared cache pages with particular users. Most proxy servers will not cache pages with this setting.                                                                            

Example 1:


// Property set to Public cache
<% response.CacheControl="Public" %>

Example 2: 


// Property set to private cache 
<% response.CacheControl="Private" %>

Last Updated : 31 Jul, 2020
Like Article
Save Article
Similar Reads
Related Tutorials