This documentation is archived and is not being maintained.

HttpCacheVaryByHeaders.UserCharSet Property

Gets or sets a value indicating whether the origin server adds the Accept-Charset field to the Vary HTTP header.

[Visual Basic]
Public Property UserCharSet As Boolean
public bool UserCharSet {get; set;}
public: __property bool get_UserCharSet();
public: __property void set_UserCharSet(bool);
public function get UserCharSet() : Boolean;
public function set UserCharSet(Boolean);

Property Value

The default value is false. When set to true, this property causes ASP.NET to add the Accept-Charset field to the Vary HTTP header sent to the client.


The Vary header indicates the request-header fields that the server uses to determine which of multiple cached responses is sent in response to a client request. The Accept-CharSet field specifies that the server selects the response based on the client's character set.

For more information on HTTP cache control headers, see RFC 2616: Hypertext Transfer Protocol -- HTTP/1.1, available on the World Wide Web Consortium's Web site at See section 14, "Header Field Definitions", for complete details.


 [Visual Basic]
 'This example performs some action only if the UserCharSet
 'is True.
 If Response.Cache.VaryByHeaders.UserCharSet = True Then
 End If


Platforms: Windows 2000, Windows XP Professional, Windows Server 2003 family

See Also

HttpCacheVaryByHeaders Class | HttpCacheVaryByHeaders Members | System.Web Namespace