Windows apps
Collapse the table of content
Expand the table of content
Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

HttpResponse::SuppressDefaultCacheControlHeader Property

 

[Supported in the .NET Framework 4.5.2 and later versions]

Gets or sets a value indicating whether to suppress the default Cache Control: private header for the current HTTP response.

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

public:
property bool SuppressDefaultCacheControlHeader {
	bool get();
	void set(bool value);
}

Property Value

Type: System::Boolean

true to suppress the default Cache Control: private header for the current HTTP response; otherwise, false.

By default, ASP.NET sends a Cache-Control: private response header unless an explicit cache policy has been specified for this response. This property allows suppressing this default response header on a per-request basis. The header can still be suppressed for the entire application by setting SendCacheControlHeader in httpRuntime Element (ASP.NET Settings Schema) or outputCache Element for caching (ASP.NET Settings Schema).

Use caution when suppressing the default Cache-Control: private header, as proxies and other intermediaries may treat responses without this header as cacheable by default. This treatment can lead to the inadvertent caching of sensitive information. See RFC 2616, Sec. 13.4 for more information.

.NET Framework
Available since 4.5.2
Return to top
Show:
© 2017 Microsoft