System.Web.HttpCachePolicy.SetNoTransforms Method

Sets the Cache-Control: no-transform HTTP header.

Syntax

public void SetNoTransforms ()

Remarks

The Cache-Control: no-transform HTTP header instructs network caching applications not to modify the document.

The Cache-Control: no-transform HTTP header prevents downstream proxy servers from changing any header values specified by the Content-Encoding, Content-Range, or Content-Type headers (this includes the entity body). For example, it prevents proxies from converting GIF images to PNG.

As with other restrictions on caching, once HttpCachePolicy.SetNoTransforms is called, the Cache-Control: no-transform HTTP header cannot be disabled through the System.Web.HttpCachePolicy interface.

HttpCachePolicy.SetNoTransforms is introduced in the .NET Framework version 3.5. For more information, see The .NET Framework 3.5 Architecture.

Requirements

Namespace: System.Web
Assembly: System.Web (in System.Web.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0