System.Web Namespace HttpCachePolicy Class
Sets the Vary HTTP header to the specified text string.
[ VB ]
Public Sub SetVaryByCustom ( _
ByVal custom As String _
)
[ C# ]
public void SetVaryByCustom (
string custom
);
[ C++ ]
public: void SetVaryByCustom (
String* custom
);
[ JScript ]
public function SetVaryByCustom (
custom : String
);
- custom
- The text to set the Vary header to.
The following example sets the Vary header to the string "Accept-Charset" to notify the origin-server's cache to choose one of several cached responses depending on the browser's Accept-Charset header.
[ VB ]
Response.Cache.SetVaryByCustom ( "Accept-Charset" )
[ C# ]
Response.Cache.SetVaryByCustom ( "Accept-Charset" );
[ JScript ]
Response.Cache.SetVaryByCustom ( "Accept-Charset" )
HttpCachePolicy Members Caching Multiple Versions of a Page