aboutsummaryrefslogtreecommitdiff
path: root/files/es/web/http/headers/accept-charset/index.html
diff options
context:
space:
mode:
authorPeter Bengtsson <mail@peterbe.com>2020-12-08 14:41:45 -0500
committerPeter Bengtsson <mail@peterbe.com>2020-12-08 14:41:45 -0500
commit1109132f09d75da9a28b649c7677bb6ce07c40c0 (patch)
tree0dd8b084480983cf9f9680e8aedb92782a921b13 /files/es/web/http/headers/accept-charset/index.html
parent4b1a9203c547c019fc5398082ae19a3f3d4c3efe (diff)
downloadtranslated-content-1109132f09d75da9a28b649c7677bb6ce07c40c0.tar.gz
translated-content-1109132f09d75da9a28b649c7677bb6ce07c40c0.tar.bz2
translated-content-1109132f09d75da9a28b649c7677bb6ce07c40c0.zip
initial commit
Diffstat (limited to 'files/es/web/http/headers/accept-charset/index.html')
-rw-r--r--files/es/web/http/headers/accept-charset/index.html85
1 files changed, 85 insertions, 0 deletions
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
+---
+<div>{{HTTPSidebar}}</div>
+
+<p>The <strong><code>Accept-Charset</code></strong> request HTTP header advertises which character set the client is able to understand. Using <a href="/en-US/docs/Web/HTTP/Content_negotiation">content negotiation</a>, 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.</p>
+
+<p>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 <code>Accept-Charset</code> header in this case.</p>
+
+<div class="note">
+<p>In early versions of HTTP/1.1, a default charset (<code>ISO-8859-1</code>) was defined. This is no more the case and now each content type may have its own default.</p>
+</div>
+
+<table class="properties">
+ <tbody>
+ <tr>
+ <th scope="row">Header type</th>
+ <td>{{Glossary("Request header")}}</td>
+ </tr>
+ <tr>
+ <th scope="row">{{Glossary("Forbidden header name")}}</th>
+ <td>yes</td>
+ </tr>
+ </tbody>
+</table>
+
+<h2 id="Syntax">Syntax</h2>
+
+<pre class="syntaxbox">Accept-Charset: &lt;charset&gt;
+
+// Multiple types, weighted with the {{glossary("quality values", "quality value")}} syntax:
+Accept-Charset: utf-8, iso-8859-1;q=0.5</pre>
+
+<h2 id="Directives">Directives</h2>
+
+<dl>
+ <dt><code>&lt;charset&gt;</code></dt>
+ <dd>Un conjunto de caracteres como <code>utf-8</code> o <code>iso-8859-15.</code></dd>
+ <dt><code>*</code></dt>
+ <dd>Any charset not mentioned elsewhere in the header; <code>'*'</code> being used as a wildcard.</dd>
+ <dt><code>;q=</code> (q-factor weighting)</dt>
+ <dd>Any value is placed in an order of preference expressed using a relative <a href="/en-US/docs/Glossary/Quality_values">quality value</a> called the <em>weight</em>.</dd>
+</dl>
+
+<h2 id="Examples">Examples</h2>
+
+<pre>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
+</pre>
+
+<h2 id="Especificaciones">Especificaciones</h2>
+
+<table class="standard-table">
+ <tbody>
+ <tr>
+ <th scope="col">Especificación</th>
+ <th scope="col">Título</th>
+ </tr>
+ <tr>
+ <td>{{RFC("7231", "Accept-Charset", "5.3.3")}}</td>
+ <td>Hypertext Transfer Protocol (HTTP/1.1): Semantics and Context</td>
+ </tr>
+ </tbody>
+</table>
+
+<h2 id="Compatibilidad_del_navegador">Compatibilidad del navegador</h2>
+
+<p class="hidden">La compatibilidad de la tabla en esta página es generada de una data estructurada. Si quieres contribuir con la Data, por favor revisa: <a href="https://github.com/mdn/browser-compat-data">https://github.com/mdn/browser-compat-data</a> y envíanos tu solicitud.</p>
+
+<p>{{Compat("http.headers.Accept-Charset")}}</p>
+
+<h2 id="También_puedes_revisar">También puedes revisar:</h2>
+
+<ul>
+ <li>HTTP <a href="/en-US/docs/Web/HTTP/Content_negotiation">content negotiation</a></li>
+ <li>Encabezados conlos resultados de la negociación de contenido: {{HTTPHeader("Content-Type")}}</li>
+ <li>Otros encabezados similares: {{HTTPHeader("TE")}}, {{HTTPHeader("Accept-Encoding")}}, {{HTTPHeader("Accept-Language")}}, {{HTTPHeader("Accept")}}</li>
+</ul>