From 1109132f09d75da9a28b649c7677bb6ce07c40c0 Mon Sep 17 00:00:00 2001 From: Peter Bengtsson Date: Tue, 8 Dec 2020 14:41:45 -0500 Subject: initial commit --- .../es/web/http/headers/accept-charset/index.html | 85 ++++++++++++++++++++++ 1 file changed, 85 insertions(+) create mode 100644 files/es/web/http/headers/accept-charset/index.html (limited to 'files/es/web/http/headers/accept-charset/index.html') diff --git a/files/es/web/http/headers/accept-charset/index.html b/files/es/web/http/headers/accept-charset/index.html new file mode 100644 index 0000000000..a6a5f9c6c8 --- /dev/null +++ b/files/es/web/http/headers/accept-charset/index.html @@ -0,0 +1,85 @@ +--- +title: Accept-Charset +slug: Web/HTTP/Headers/Accept-Charset +tags: + - Negociación de Contenido +translation_of: Web/HTTP/Headers/Accept-Charset +--- +
{{HTTPSidebar}}
+ +

The Accept-Charset request HTTP header advertises which character set the client is able to understand. Using content negotiation, the server then selects one of the proposals, uses it and informs the client of its choice within the {{HTTPHeader("Content-Type")}} response header. Browsers usually don't set this header as the default value for each content type is usually correct and transmitting it would allow easier fingerprinting.

+ +

If the server cannot serve any matching character set, it can theoretically send back a {{HTTPStatus("406")}} (Not Acceptable) error code. But, for a better user experience, this is rarely done and the more common way is to ignore the Accept-Charset header in this case.

+ +
+

In early versions of HTTP/1.1, a default charset (ISO-8859-1) was defined. This is no more the case and now each content type may have its own default.

+
+ + + + + + + + + + + + +
Header type{{Glossary("Request header")}}
{{Glossary("Forbidden header name")}}yes
+ +

Syntax

+ +
Accept-Charset: <charset>
+
+// Multiple types, weighted with the {{glossary("quality values", "quality value")}} syntax:
+Accept-Charset: utf-8, iso-8859-1;q=0.5
+ +

Directives

+ +
+
<charset>
+
Un conjunto de caracteres como utf-8 o iso-8859-15.
+
*
+
Any charset not mentioned elsewhere in the header; '*' being used as a wildcard.
+
;q= (q-factor weighting)
+
Any value is placed in an order of preference expressed using a relative quality value called the weight.
+
+ +

Examples

+ +
Accept-Charset: iso-8859-1
+
+Accept-Charset: utf-8, iso-8859-1;q=0.5
+
+Accept-Charset: utf-8, iso-8859-1;q=0.5, *;q=0.1
+
+ +

Especificaciones

+ + + + + + + + + + + + +
EspecificaciónTítulo
{{RFC("7231", "Accept-Charset", "5.3.3")}}Hypertext Transfer Protocol (HTTP/1.1): Semantics and Context
+ +

Compatibilidad del navegador

+ + + +

{{Compat("http.headers.Accept-Charset")}}

+ +

También puedes revisar:

+ + -- cgit v1.2.3-54-g00ecf