Skip to content
Related Articles

Related Articles

ASP CacheControl Property
  • Last Updated : 31 Jul, 2020

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. 

Syntax

response.CacheControl[=control_header]

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:



HTML

filter_none

edit
close

play_arrow

link
brightness_4
code

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

chevron_right


Example 2: 

HTML

filter_none

edit
close

play_arrow

link
brightness_4
code

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

chevron_right


My Personal Notes arrow_drop_up
Recommended Articles
Page :