SendCacheControlHeader Property

OutputCacheSection.SendCacheControlHeader Property

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)

public bool SendCacheControlHeader { get; set; }
/** @property */
public boolean get_SendCacheControlHeader ()

/** @property */
public void set_SendCacheControlHeader (boolean value)

public function get SendCacheControlHeader () : boolean

public function set SendCacheControlHeader (value : boolean)

Not applicable.

Property Value

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;

Windows 98, Windows Server 2000 SP4, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.

.NET Framework

Supported in: 3.0, 2.0

Community Additions

© 2015 Microsoft