Skip to content

Commit

Permalink
Accept-Charset HTTP header removed - not sent by any browser for many…
Browse files Browse the repository at this point in the history
… years and deprecated (#36854)
  • Loading branch information
hamishwillee authored Nov 20, 2024
1 parent dad9fbc commit 56cbe48
Show file tree
Hide file tree
Showing 11 changed files with 15 additions and 65 deletions.
1 change: 1 addition & 0 deletions files/en-us/_redirects.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12285,6 +12285,7 @@
/en-US/docs/Web/HTTP/Feature_Policy /en-US/docs/Web/HTTP/Permissions_Policy
/en-US/docs/Web/HTTP/Gecko_user_agent_string_reference /en-US/docs/Web/HTTP/Headers/User-Agent/Firefox
/en-US/docs/Web/HTTP/HTTP_response_codes /en-US/docs/Web/HTTP/Status
/en-US/docs/Web/HTTP/Headers/Accept-Charset /en-US/docs/Web/HTTP/Headers
/en-US/docs/Web/HTTP/Headers/Cache-Disposition /en-US/docs/Web/HTTP/Headers/Content-Disposition
/en-US/docs/Web/HTTP/Headers/Content-Security-Policy/Sources /en-US/docs/Web/HTTP/Headers/Content-Security-Policy#fetch_directive_syntax
/en-US/docs/Web/HTTP/Headers/Content-Security-Policy/navigate-to /en-US/docs/Web/HTTP/Headers/Content-Security-Policy
Expand Down
11 changes: 0 additions & 11 deletions files/en-us/_wikihistory.json
Original file line number Diff line number Diff line change
Expand Up @@ -98998,17 +98998,6 @@
"modified": "2020-10-15T22:23:14.705Z",
"contributors": ["j9t", "Malvoz", "bershanskiy"]
},
"Web/HTTP/Headers/Accept-Charset": {
"modified": "2020-10-15T21:48:48.975Z",
"contributors": [
"mfuji09",
"Tigt",
"fscholz",
"ottaviano",
"Minstel",
"teoli"
]
},
"Web/HTTP/Headers/Accept-Encoding": {
"modified": "2020-12-04T01:30:23.076Z",
"contributors": [
Expand Down
1 change: 0 additions & 1 deletion files/en-us/glossary/forbidden_header_name/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ fetch("https://httpbin.org/get", {
Names starting with `Sec-` are reserved for creating new headers safe from {{glossary("API","APIs")}} that grant developers control over headers, such as {{domxref("Window/fetch", "fetch()")}}.
Forbidden header names start with `Proxy-` or `Sec-`, or are one of the following names:

- {{HTTPHeader("Accept-Charset")}}
- {{HTTPHeader("Accept-Encoding")}}
- {{HTTPHeader("Access-Control-Request-Headers")}}
- {{HTTPHeader("Access-Control-Request-Method")}}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,6 @@ User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8
Referer: https://developer.mozilla.org/en-US/
Accept-Encoding: gzip, deflate, sdch, br
Accept-Charset: ISO-8859-1,UTF-8;q=0.7,*;q=0.7
Accept-Language: en-US,en;q=0.8,es;q=0.6
Cookie: sessionid=6ynxs23n521lu21b1t136rhbv7ezngie; csrftoken=zIPUJsAZv6pcgCBJSCj1zU6pQZbfMUAT; dwf_section_edit=False; dwf_sg_task_completion=False; _gat=1; _ga=GA1.2.1688886003.1471911953; ffo=true
```
Expand All @@ -98,7 +97,7 @@ For example, you can see here that:

- My browser (`User-Agent`) is Mozilla Firefox (`Mozilla/5.0`).
- It can accept gzip compressed information (`Accept-Encoding: gzip`).
- It can accept the specified set of characters (`Accept-Charset: ISO-8859-1,UTF-8;q=0.7,*;q=0.7`) and languages (`Accept-Language: en-US,en;q=0.8,es;q=0.6`).
- It can accept the specified languages (`Accept-Language: en-US,en;q=0.8,es;q=0.6`).
- The `Referer` line indicates the address of the web page that contained the link to this resource (i.e. the origin of the request, `https://developer.mozilla.org/en-US/`).

HTTP requests can also have a body, but it is empty in this case.
Expand Down
3 changes: 2 additions & 1 deletion files/en-us/mozilla/firefox/releases/10/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,8 @@ Great progress has been made to update IndexedDB to the latest draft specificati

### Networking

- The HTTP `Accept-Charset` header is no longer sent in HTTP requests. In its absence, servers should respond by sending UTF-8.
- The HTTP `Accept-Charset` header is no longer sent in HTTP requests.
In its absence, servers should respond by sending UTF-8.

### Developer tools

Expand Down
12 changes: 7 additions & 5 deletions files/en-us/web/api/htmlformelement/acceptcharset/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,18 +8,20 @@ browser-compat: api.HTMLFormElement.acceptCharset

{{APIRef("HTML DOM")}}

The **`HTMLFormElement.acceptCharset`** property represents a
list of the supported [character encodings](/en-US/docs/Glossary/Character_encoding) for the given {{htmlelement("form")}} element. This list can be
comma-separated or space-separated.
The **`HTMLFormElement.acceptCharset`** property represents the {{glossary("character encoding")}} for the given {{htmlelement("form")}} element.

The specification allows a single case-insensitive value of `"UTF-8"`, reflecting the ubiquity of this encoding (historically multiple character encodings could be specified as a comma-separated or space-separated list).

This reflects the value of the form's [`accept-charset`](/en-US/docs/Web/HTML/Element/form#accept-charset) HTML attribute.

## Value

A string.
A string which may be a case-insensitive match for `UTF-8`.

## Examples

```js
let inputs = document.forms["my-form"].acceptCharset;
let charSet = document.forms["my-form"].acceptCharset;
```

## Specifications
Expand Down
2 changes: 1 addition & 1 deletion files/en-us/web/api/htmlformelement/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ _This interface also inherits properties from its parent, {{domxref("HTMLElement
- {{domxref("HTMLFormElement.encoding")}} or {{domxref("HTMLFormElement.enctype")}}
- : A string reflecting the value of the form's [`enctype`](/en-US/docs/Web/HTML/Element/form#enctype) HTML attribute, indicating the type of content that is used to transmit the form to the server. Only specified values can be set. The two properties are synonyms.
- {{domxref("HTMLFormElement.acceptCharset")}}
- : A string reflecting the value of the form's [`accept-charset`](/en-US/docs/Web/HTML/Element/form#accept-charset) HTML attribute, representing the character encoding that the server accepts.
- : A string reflecting the value of the form's [`accept-charset`](/en-US/docs/Web/HTML/Element/form#accept-charset) HTML attribute.
- {{domxref("HTMLFormElement.autocomplete")}}
- : A string reflecting the value of the form's [`autocomplete`](/en-US/docs/Web/HTML/Element/form#autocomplete) HTML attribute, indicating whether the controls in this form can have their values automatically populated by the browser.
- {{domxref("HTMLFormElement.noValidate")}}
Expand Down
2 changes: 1 addition & 1 deletion files/en-us/web/html/attributes/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ Elements in HTML have **attributes**; these are additional values that configure
<code><a href="/en-US/docs/Web/HTML/Element/form#accept-charset">accept-charset</a></code>
</td>
<td>{{ HTMLElement("form") }}</td>
<td>List of supported charsets.</td>
<td>The character set, which if provided must be <code>"UTF-8"</code>.</td>
</tr>
<tr>
<td>
Expand Down
4 changes: 2 additions & 2 deletions files/en-us/web/html/element/form/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ This element includes the [global attributes](/en-US/docs/Web/HTML/Global_attrib
- `accept-charset`

- : Space-separated {{Glossary("character encoding", "character encodings")}} the server accepts. The browser uses them in the order in which they are listed. The default value means [the same encoding as the page](/en-US/docs/Web/HTTP/Headers/Content-Encoding).
(In previous versions of HTML, character encodings could also be delimited by commas.)
- : The {{Glossary("character encoding")}} accepted by the server.
The specification allows a single case-insensitive value of `"UTF-8"`, reflecting the ubiquity of this encoding (historically multiple character encodings could be specified as a comma-separated or space-separated list).

- `autocapitalize`

Expand Down
38 changes: 0 additions & 38 deletions files/en-us/web/http/headers/accept-charset/index.md

This file was deleted.

3 changes: 0 additions & 3 deletions files/en-us/web/http/headers/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -84,9 +84,6 @@ For more details, refer to the [Content negotiation article](/en-US/docs/Web/HTT

- {{HTTPHeader("Accept")}}
- : Informs the server about the {{Glossary("MIME_type", "types")}} of data that can be sent back.
- {{HTTPHeader("Accept-Charset")}} {{deprecated_inline}}
- : Advertises a client's supported {{glossary("character encoding", "character encodings")}}.
It is deprecated because {{Glossary("UTF-8")}} has become ubiquitous and use of the header makes client fingerprinting easier.
- {{HTTPHeader("Accept-Encoding")}}
- : The encoding algorithm, usually a [compression algorithm](/en-US/docs/Web/HTTP/Compression), that can be used on the resource sent back.
- {{HTTPHeader("Accept-Language")}}
Expand Down

0 comments on commit 56cbe48

Please sign in to comment.