HttpCacheVaryByHeaders.UserCharSet Propriedade

Definição

Obtém ou define um valor que indica se o cache de saída ASP.NET varia nas respostas armazenadas em cache pelo cabeçalho Accept-Charset e acrescenta-o ao cabeçalho HTTP Vary de saída.Gets or sets a value indicating whether the ASP.NET output cache varies the cached responses by the Accept-Charset header, and appends it to the out-going Vary HTTP header.

public:
 property bool UserCharSet { bool get(); void set(bool value); };
public bool UserCharSet { get; set; }
member this.UserCharSet : bool with get, set
Public Property UserCharSet As Boolean

Valor da propriedade

Boolean

true Quando o cache de saída do ASP.NET varia de acordo com o Accept-Charset cabeçalho e o adiciona ao Vary cabeçalho http enviado ao cliente; caso contrário, false .true when the ASP.NET output cache varies by the Accept-Charset header and adds it to the Vary HTTP header sent to the client; otherwise, false. O valor padrão é false.The default value is false.

Exemplos

O exemplo de código a seguir demonstra como alguma ação é executada somente se a UserCharSet propriedade é true .The following code example demonstrates how some action is performed only if the UserCharSet property is true.

Response.Cache.VaryByHeaders.UserCharSet = true;
Response.Cache.VaryByHeaders.UserCharSet = True

Comentários

O Vary cabeçalho indica os campos de cabeçalho de solicitação que o servidor usa para determinar quais das várias respostas em cache são enviadas em resposta a uma solicitação do cliente.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. O Accept-CharSet campo especifica que o servidor seleciona a resposta com base no conjunto de caracteres do cliente.The Accept-CharSet field specifies that the server selects the response based on the client's character set.

Para obter mais informações, consulte RFC 2616: protocolo de transferência de hipertexto--HTTP/1.1, disponível no site da World Wide Web Consortium (W3C).For more information, see RFC 2616: Hypertext Transfer Protocol -- HTTP/1.1, available on the World Wide Web Consortium (W3C) Web site. Consulte a seção 14, "definições de campo de cabeçalho", para obter detalhes completos.See section 14, "Header Field Definitions", for complete details.

Aplica-se a