OutputCacheSection.SendCacheControlHeader Property


The .NET API Reference documentation has a new home. Visit the .NET API Browser on docs.microsoft.com to see the new experience.

Gets or sets a value indicating whether the cache-control:private header is sent by the output cache module by default.

Namespace:   System.Web.Configuration
Assembly:  System.Web (in System.Web.dll)

[ConfigurationPropertyAttribute("sendCacheControlHeader", DefaultValue = true)]
public bool SendCacheControlHeader { get; set; }

Property Value

Type: System.Boolean

true if the sending of cache-control:private header is enabled; otherwise, false. The default is true.

The SendCacheControlHeader applies to content with no output caching specified. When it is set to false, the cache-control:private header is not sent by default.


This setting enables the content to be cached on the client by default.

The following code example shows how to use the SendCacheControlHeader property.

// Get the current SendCacheControlHeader.
Boolean sendCacheControlHeaderValue = 

// Set the SendCacheControlHeader.
outputCacheSection.SendCacheControlHeader = false;

.NET Framework
Available since 2.0
Return to top