From dfdfd2d7a98d8659b466aca96d2c4eb133d10303 Mon Sep 17 00:00:00 2001 From: Vadim Makeev Date: Tue, 19 Dec 2023 12:12:29 +0100 Subject: [PATCH 1/6] Add new tail-call WASM features (#31040) --- .../reference/control_flow/call/index.md | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/files/en-us/webassembly/reference/control_flow/call/index.md b/files/en-us/webassembly/reference/control_flow/call/index.md index 06182777fba3d92..4b7f6c54abd3670 100644 --- a/files/en-us/webassembly/reference/control_flow/call/index.md +++ b/files/en-us/webassembly/reference/control_flow/call/index.md @@ -6,7 +6,7 @@ page-type: webassembly-instruction {{WebAssemblySidebar}} -**`call`** calls a function. `call_indirect` calls a function in a table. +**`call`** calls a function, `return_call` being the tail-call version of it. `call_indirect` calls a function in a table with the `return_call_indirect` tail-call version as well. {{EmbedInteractiveExample("pages/wat/call.html", "tabbed-standard")}} @@ -16,7 +16,14 @@ page-type: webassembly-instruction call $greet ``` -| Instruction | Binary opcode | -| --------------- | ------------- | -| `call` | `0x10` | -| `call_indirect` | `0x11` | +| Instruction | Binary opcode | +| ---------------------- | ------------- | +| `call` | `0x10` | +| `call_indirect` | `0x11` | +| `return_call` | `0x12` | +| `return_call_indirect` | `0x13` | + +## See also + +- [Tail Call Extension proposal overview](https://github.com/WebAssembly/tail-call/blob/main/proposals/tail-call/Overview.md) +- [V8 on WebAssembly tail calls support](https://v8.dev/blog/wasm-tail-call) From b8988df4d61b30954968392ca8da3715da5b837c Mon Sep 17 00:00:00 2001 From: Dave Letorey Date: Tue, 19 Dec 2023 11:38:38 +0000 Subject: [PATCH 2/6] 29787 text wrap (#31148) * added pretty & stable to text wrap * added a section on when balance/pretty/stable should be used * Updated the heading to Description * added the experimental release note for text-wrap * added text-wrap to the release note 121 * Update files/en-us/web/css/text-wrap/index.md Co-authored-by: Zach Fox <3409031+zfox23@users.noreply.github.com> * Update files/en-us/web/css/text-wrap/index.md Co-authored-by: Estelle Weyl * Update files/en-us/mozilla/firefox/releases/121/index.md Co-authored-by: Zach Fox <3409031+zfox23@users.noreply.github.com> * Update files/en-us/mozilla/firefox/experimental_features/index.md Co-authored-by: Zach Fox <3409031+zfox23@users.noreply.github.com> * Update files/en-us/web/css/text-wrap/index.md Co-authored-by: Zach Fox <3409031+zfox23@users.noreply.github.com> * simplified the language speed over paint performance * Update files/en-us/web/css/text-wrap/index.md Co-authored-by: Estelle Weyl * made the description of stable clearer * Update files/en-us/mozilla/firefox/releases/121/index.md Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> * Update files/en-us/web/css/text-wrap/index.md Co-authored-by: Estelle Weyl * Update files/en-us/web/css/text-wrap/index.md Co-authored-by: Estelle Weyl * Update files/en-us/web/css/text-wrap/index.md Co-authored-by: Estelle Weyl * working on Description * updated the description to be simpler * added heading as an example * fixed the flaw in the headings link * corrected user to used and advise to prompt --------- Co-authored-by: Zach Fox <3409031+zfox23@users.noreply.github.com> Co-authored-by: Estelle Weyl Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> --- files/en-us/web/css/text-wrap/index.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/files/en-us/web/css/text-wrap/index.md b/files/en-us/web/css/text-wrap/index.md index bdda80ce151497b..2541a9d09a3c11f 100644 --- a/files/en-us/web/css/text-wrap/index.md +++ b/files/en-us/web/css/text-wrap/index.md @@ -49,7 +49,7 @@ The `text-wrap` property is specified as a single keyword chosen from the list o ## Description -There are 2 ways that text can flow across lines within a block of content, such as a paragraph ({{HTMLElement("p")}}) or headings ({{HTMLElement("heading_elements","<h1>–<h6>")}}). These are _forced line breaks_, that are controlled by the user, and _soft line breaks_, that are controlled by the browser. The `text-wrap` property can be user to advise the browser how to control the _soft line breaks_. +There are 2 ways that text can flow across lines within a block of content, such as a paragraph ({{HTMLElement("p")}}) or headings ({{HTMLElement("heading_elements","<h1>–<h6>")}}). These are _forced line breaks_, that are controlled by the user, and _soft line breaks_, that are controlled by the browser. The `text-wrap` property can be used to prompt the browser how to control the _soft line breaks_. The value you choose, for `text-wrap`, depends on how many lines of text you anticipate styling, whether the text is `contenteditable`, and whether you need to prioritize appearance or performance. From 2f23e6c1cf013c984079783b5e5e67464beb6298 Mon Sep 17 00:00:00 2001 From: Florian Scholz Date: Tue, 19 Dec 2023 13:53:38 +0100 Subject: [PATCH 3/6] Remove docs for SVG contentStyleType and contentScriptType attrs (#31152) --- files/en-us/_redirects.txt | 2 - files/en-us/_wikihistory.json | 8 --- files/en-us/web/api/svgsvgelement/index.md | 2 - .../svg/attribute/contentscripttype/index.md | 49 --------------- .../svg/attribute/contentstyletype/index.md | 59 ------------------- files/en-us/web/svg/attribute/index.md | 2 - files/en-us/web/svg/attribute/style/index.md | 2 - files/en-us/web/svg/element/svg/index.md | 6 -- files/jsondata/SVGData.json | 2 - 9 files changed, 132 deletions(-) delete mode 100644 files/en-us/web/svg/attribute/contentscripttype/index.md delete mode 100644 files/en-us/web/svg/attribute/contentstyletype/index.md diff --git a/files/en-us/_redirects.txt b/files/en-us/_redirects.txt index 0578a1896bc58ad..f3913ed5168ea77 100644 --- a/files/en-us/_redirects.txt +++ b/files/en-us/_redirects.txt @@ -6497,8 +6497,6 @@ /en-US/docs/SVG/Attribute/color-interpolation /en-US/docs/Web/SVG/Attribute/color-interpolation /en-US/docs/SVG/Attribute/color-interpolation-filters /en-US/docs/Web/SVG/Attribute/color-interpolation-filters /en-US/docs/SVG/Attribute/color-profile /en-US/docs/Web/SVG/Attribute/color-profile -/en-US/docs/SVG/Attribute/contentScriptType /en-US/docs/Web/SVG/Attribute/contentScriptType -/en-US/docs/SVG/Attribute/contentStyleType /en-US/docs/Web/SVG/Attribute/contentStyleType /en-US/docs/SVG/Attribute/cursor /en-US/docs/Web/SVG/Attribute/cursor /en-US/docs/SVG/Attribute/cx /en-US/docs/Web/SVG/Attribute/cx /en-US/docs/SVG/Attribute/cy /en-US/docs/Web/SVG/Attribute/cy diff --git a/files/en-us/_wikihistory.json b/files/en-us/_wikihistory.json index 60db8e73468ec21..1f7f046d6a3a387 100644 --- a/files/en-us/_wikihistory.json +++ b/files/en-us/_wikihistory.json @@ -124185,14 +124185,6 @@ "modified": "2020-10-15T21:04:59.286Z", "contributors": ["Sebastianz", "connorshea", "Jeremie"] }, - "Web/SVG/Attribute/contentScriptType": { - "modified": "2020-10-15T21:09:10.002Z", - "contributors": ["Sebastianz", "Jeremie"] - }, - "Web/SVG/Attribute/contentStyleType": { - "modified": "2020-10-15T21:09:14.670Z", - "contributors": ["Sebastianz", "George8211", "Jeremie", "pa7"] - }, "Web/SVG/Attribute/cursor": { "modified": "2020-10-15T21:18:37.523Z", "contributors": [ diff --git a/files/en-us/web/api/svgsvgelement/index.md b/files/en-us/web/api/svgsvgelement/index.md index 1febde981a02dca..fba0c65068b1252 100644 --- a/files/en-us/web/api/svgsvgelement/index.md +++ b/files/en-us/web/api/svgsvgelement/index.md @@ -23,8 +23,6 @@ _This interface also inherits properties from its parent, {{domxref("SVGGraphics - : An {{domxref("SVGAnimatedLength")}} corresponding to the {{SVGAttr("width")}} attribute of the given {{SVGElement("svg")}} element. - {{domxref("SVGSVGElement.height")}} {{ReadOnlyInline}} - : An {{domxref("SVGAnimatedLength")}} corresponding to the {{SVGAttr("height")}} attribute of the given {{SVGElement("svg")}} element. -- {{domxref("SVGSVGElement.contentStyleType")}} - - : An {{domxref("SVGAnimatedLength")}} corresponding to the {{SVGAttr("contentStyleType")}} attribute of the given {{SVGElement("svg")}} element. - {{domxref("SVGSVGElement.pixelUnitToMillimeterX")}} {{Deprecated_Inline}} - : A float representing the size of the pixel unit (as defined by CSS2) along the x-axis of the viewport, which represents a unit somewhere in the range of 70dpi to 120dpi, and, on systems that support this, might actually match the characteristics of the target medium. On systems where it is impossible to know the size of a pixel, a suitable default pixel size is provided. - {{domxref("SVGSVGElement.pixelUnitToMillimeterY")}} {{Deprecated_Inline}} diff --git a/files/en-us/web/svg/attribute/contentscripttype/index.md b/files/en-us/web/svg/attribute/contentscripttype/index.md deleted file mode 100644 index 5c727cd8daad077..000000000000000 --- a/files/en-us/web/svg/attribute/contentscripttype/index.md +++ /dev/null @@ -1,49 +0,0 @@ ---- -title: contentScriptType -slug: Web/SVG/Attribute/contentScriptType -page-type: svg-attribute -status: - - deprecated -browser-compat: svg.elements.svg.contentScriptType ---- - -{{SVGRef}}{{deprecated_header}} - -The **`contentScriptType`** attribute specifies the default scripting language for the given document fragment on the {{SVGElement("svg")}} element. - -This attribute sets the default scripting language used to process the value strings in [event attributes](/en-US/docs/Web/SVG/Attribute#document_event_attributes). This language must be used for all instances of script that do not specify their own scripting language. The value specifies a media type, per [MIME Part Two: Media Types \[RFC2046\]](https://www.ietf.org/rfc/rfc2046.txt). - -## Usage notes - - - - - - - - - - - - - - - - -
Value - One of the content types specified in the - Media Types -
Default valueapplication/ecmascript
AnimatableNo
- -## Specifications - -{{Specifications}} - -## Browser compatibility - -{{Compat}} - -## See also - -- [MIME Part Two: Media Types \[RFC2046\]](https://www.ietf.org/rfc/rfc2046.txt) -- {{SVGElement("script")}} diff --git a/files/en-us/web/svg/attribute/contentstyletype/index.md b/files/en-us/web/svg/attribute/contentstyletype/index.md deleted file mode 100644 index d7924ca0c34e2fd..000000000000000 --- a/files/en-us/web/svg/attribute/contentstyletype/index.md +++ /dev/null @@ -1,59 +0,0 @@ ---- -title: contentStyleType -slug: Web/SVG/Attribute/contentStyleType -page-type: svg-attribute -status: - - deprecated -browser-compat: svg.elements.svg.contentStyleType ---- - -{{SVGRef}}{{deprecated_header}} - -The **`contentStyleType`** attribute specifies the style sheet language for the given document fragment on the {{SVGElement("svg")}} element. - -This language is used for all instances of style that do not specify their own styling language, such as the {{SVGAttr("style")}} attribute that is available on many elements. The value specifies a media type, per [MIME Part Two: Media Types \[RFC2046\]](https://www.ietf.org/rfc/rfc2046.txt). - -## Usage notes - - - - - - - - - - - - - - - - -
Value - One of the content types specified in the - Media Types -
Default valuetext/css
AnimatableNo
- -Since CSS is the only widely deployed style sheet language for online styling and it's already defined as default value if `contentStyleType` is omitted, the attribute is not well supported in user agents. If other style sheet languages become more popular they might not use the {{SVGAttr("style")}} attribute, instead it could be easily declared which style language is used in the {{SVGElement("style")}}'s type attribute. - -The use of `contentStyleType` is therefore deprecated. - -## Specifications - -{{Specifications}} - -## Browser compatibility - -{{Compat}} - -## See also - -- [MIME Part Two: Media Types \[RFC2046\]](https://www.ietf.org/rfc/rfc2046.txt) -- {{SVGElement("style")}} element -- {{SVGAttr("style")}} attribute diff --git a/files/en-us/web/svg/attribute/index.md b/files/en-us/web/svg/attribute/index.md index a4fa660d87482f1..013392e7d6e8135 100644 --- a/files/en-us/web/svg/attribute/index.md +++ b/files/en-us/web/svg/attribute/index.md @@ -50,8 +50,6 @@ Below is a list of all of the attributes available in SVG along with links to re - {{SVGAttr("color-interpolation-filters")}} - {{SVGAttr("color-profile")}} - {{SVGAttr("color-rendering")}} -- {{SVGAttr("contentScriptType")}} -- {{SVGAttr("contentStyleType")}} - {{SVGAttr("crossorigin")}} - {{SVGAttr("cursor")}} - {{SVGAttr("cx")}} diff --git a/files/en-us/web/svg/attribute/style/index.md b/files/en-us/web/svg/attribute/style/index.md index dc6f37dd5ba6fff..70e052648537ae1 100644 --- a/files/en-us/web/svg/attribute/style/index.md +++ b/files/en-us/web/svg/attribute/style/index.md @@ -57,8 +57,6 @@ svg { - : The syntax of style data depends on the style sheet language. By default, the style sheet language is [CSS](/en-US/docs/Web/CSS). - > **Note:** In theory, [the `contentStyleType` attribute](/en-US/docs/Web/SVG/Attribute/contentStyleType) could be used to specify styling languages other than CSS, like [XSL(T)](/en-US/docs/Web/XSLT). However, this was never implemented satisfactorily in browsers, so you should not rely on it. - ## Specifications {{Specifications}} diff --git a/files/en-us/web/svg/element/svg/index.md b/files/en-us/web/svg/element/svg/index.md index e6605059d9d6665..cf38a3ed62edd89 100644 --- a/files/en-us/web/svg/element/svg/index.md +++ b/files/en-us/web/svg/element/svg/index.md @@ -94,12 +94,6 @@ To change the iframe's dimensions try resizing the dotted red border from bottom - {{SVGAttr("baseProfile")}} {{deprecated_inline}} - : The minimum SVG language profile that the document requires. _Value type_: **\** ; _Default value_: none; _Animatable_: **no** -- {{SVGAttr("contentScriptType")}} {{deprecated_inline}} - - : The default scripting language used by the SVG fragment. - _Value type_: **\** ; _Default value_: `application/ecmascript`; _Animatable_: **no** -- {{SVGAttr("contentStyleType")}} {{deprecated_inline}} - - : The default style sheet language used by the SVG fragment. - _Value type_: **\** ; _Default value_: `text/css`; _Animatable_: **no** - {{SVGAttr("height")}} - : The displayed height of the rectangular viewport. (Not the height of its coordinate system.) _Value type_: [**\**](/en-US/docs/Web/SVG/Content_type#length)|[**\**](/en-US/docs/Web/SVG/Content_type#percentage) ; _Default value_: `auto`; _Animatable_: **yes** diff --git a/files/jsondata/SVGData.json b/files/jsondata/SVGData.json index 4f0c9e4c93182bd..79c7835f17fab9c 100644 --- a/files/jsondata/SVGData.json +++ b/files/jsondata/SVGData.json @@ -1506,8 +1506,6 @@ "'width'", "'height'", "'preserveAspectRatio'", - "'contentScriptType'", - "'contentStyleType'", "'viewBox'" ], "interfaces": ["SVGSVGElement"] From 34f5de04649ca50073c7e77d6ea55bc6a49225cf Mon Sep 17 00:00:00 2001 From: Florian Scholz Date: Tue, 19 Dec 2023 13:56:16 +0100 Subject: [PATCH 4/6] Remove docs for SVG viewTarget attribute (#31151) * Remove docs for SVG viewTarget attribute * Fix macro typo --- files/en-us/_wikihistory.json | 4 -- files/en-us/web/api/svgsvgelement/index.md | 7 ++- files/en-us/web/svg/attribute/index.md | 1 - .../web/svg/attribute/viewtarget/index.md | 46 ------------------- files/en-us/web/svg/element/view/index.md | 1 - files/jsondata/SVGData.json | 3 +- 6 files changed, 4 insertions(+), 58 deletions(-) delete mode 100644 files/en-us/web/svg/attribute/viewtarget/index.md diff --git a/files/en-us/_wikihistory.json b/files/en-us/_wikihistory.json index 1f7f046d6a3a387..6790b11fabc39ca 100644 --- a/files/en-us/_wikihistory.json +++ b/files/en-us/_wikihistory.json @@ -125369,10 +125369,6 @@ "Mogglewump" ] }, - "Web/SVG/Attribute/viewTarget": { - "modified": "2020-10-15T22:18:25.792Z", - "contributors": ["Sebastianz"] - }, "Web/SVG/Attribute/visibility": { "modified": "2020-10-15T21:07:30.330Z", "contributors": [ diff --git a/files/en-us/web/api/svgsvgelement/index.md b/files/en-us/web/api/svgsvgelement/index.md index fba0c65068b1252..58afe7a99e9d50c 100644 --- a/files/en-us/web/api/svgsvgelement/index.md +++ b/files/en-us/web/api/svgsvgelement/index.md @@ -38,22 +38,21 @@ _This interface also inherits properties from its parent, {{domxref("SVGGraphics - : An {{domxref("SVGViewSpec")}} defining the initial view (i.e., before magnification and panning) of the current innermost SVG document fragment. The meaning depends on the situation: If the initial view was a "standard" view, then: - the values for {{SVGAttr("viewBox")}}, {{SVGAttr("preserveAspectRatio")}} and {{SVGAttr("zoomAndPan")}} within {{SVGAttr("currentView")}} will match the values for the corresponding DOM attributes that are on `SVGSVGElement` directly - - the values for {{SVGAttr("transform")}} and {{SVGAttr("viewTarget")}} within {{SVGAttr("currentView")}} will be `null` + - the value for {{SVGAttr("transform")}} within {{SVGAttr("currentView")}} will be `null` If the initial view was a link into a {{SVGElement("view")}} element, then: - the values for {{SVGAttr("viewBox")}}, {{SVGAttr("preserveAspectRatio")}} and {{SVGAttr("zoomAndPan")}} within {{SVGAttr("currentView")}} will correspond to the corresponding attributes for the given {{SVGElement("view")}} element - - the values for {{SVGAttr("transform")}} and {{SVGAttr("viewTarget")}} within {{SVGAttr("currentView")}} will be `null` + - the value for {{SVGAttr("transform")}} within {{SVGAttr("currentView")}} will be `null` If the initial view was a link into another element (i.e., other than a {{SVGElement("view")}}), then: - the values for {{SVGAttr("viewBox")}}, {{SVGAttr("preserveAspectRatio")}} and {{SVGAttr("zoomAndPan")}} within {{SVGAttr("currentView")}} will match the values for the corresponding DOM attributes that are on `SVGSVGElement` directly for the closest ancestor {{SVGElement("svg")}} element - the values for {{SVGAttr("transform")}} within {{SVGAttr("currentView")}} will be `null` - - the {{SVGAttr("viewTarget")}} within {{SVGAttr("currentView")}} will represent the target of the link If the initial view was a link into the SVG document fragment using an SVG view specification fragment identifier (i.e., `#svgView(…)`), then: - - the values for {{SVGAttr("viewBox")}}, {{SVGAttr("preserveAspectRatio")}}, {{SVGAttr("zoomAndPan")}}, {{SVGAttr("transform")}} and {{SVGAttr("viewTarget")}} within {{SVGAttr("currentView")}} will correspond to the values from the SVG view specification fragment identifier + - the values for {{SVGAttr("viewBox")}}, {{SVGAttr("preserveAspectRatio")}}, {{SVGAttr("zoomAndPan")}}, {{SVGAttr("transform")}} within {{SVGAttr("currentView")}} will correspond to the values from the SVG view specification fragment identifier - {{domxref("SVGSVGElement.currentScale")}} - : On an outermost {{SVGElement("svg")}} element, this float attribute indicates the current scale factor relative to the initial view to take into account user magnification and panning operations. DOM attributes `currentScale` and `currentTranslate` are equivalent to the 2×3 matrix `[a b c d e f] = [currentScale 0 0 currentScale currentTranslate.x currentTranslate.y]`. If "magnification" is enabled (i.e., `zoomAndPan="magnify"`), then the effect is as if an extra transformation were placed at the outermost level on the SVG document fragment (i.e., outside the outermost {{SVGElement("svg")}} element). diff --git a/files/en-us/web/svg/attribute/index.md b/files/en-us/web/svg/attribute/index.md index 013392e7d6e8135..adc9524508f36d6 100644 --- a/files/en-us/web/svg/attribute/index.md +++ b/files/en-us/web/svg/attribute/index.md @@ -299,7 +299,6 @@ Below is a list of all of the attributes available in SVG along with links to re - {{SVGAttr("vert-origin-x")}} - {{SVGAttr("vert-origin-y")}} - {{SVGAttr("viewBox")}} -- {{SVGAttr("viewTarget")}} - {{SVGAttr("visibility")}} ### W diff --git a/files/en-us/web/svg/attribute/viewtarget/index.md b/files/en-us/web/svg/attribute/viewtarget/index.md deleted file mode 100644 index b89b674b86d3590..000000000000000 --- a/files/en-us/web/svg/attribute/viewtarget/index.md +++ /dev/null @@ -1,46 +0,0 @@ ---- -title: viewTarget -slug: Web/SVG/Attribute/viewTarget -page-type: svg-attribute -status: - - deprecated -browser-compat: svg.elements.view.viewTarget ---- - -{{SVGRef}}{{Deprecated_Header}} - -The **`viewTarget`** attribute indicates the target object associated with the view. - -You can use this attribute with the following SVG elements: - -- {{SVGElement("view")}} - -## Usage notes - - - - - - - - - - - - - - - - -
Value<xml-name>
Default valueNone
AnimatableNo
- -- `` - - : This value specifies the name of the object associated with the view. - -## Specifications - -{{Specifications}} - -## Browser compatibility - -{{Compat}} diff --git a/files/en-us/web/svg/element/view/index.md b/files/en-us/web/svg/element/view/index.md index 031fe1cfd576433..e3b99894b9cd766 100644 --- a/files/en-us/web/svg/element/view/index.md +++ b/files/en-us/web/svg/element/view/index.md @@ -26,7 +26,6 @@ A view is a defined way to view the image, like a zoom level or a detail view. - {{SVGAttr("viewBox")}} - {{SVGAttr("preserveAspectRatio")}} - {{SVGAttr("zoomAndPan")}} {{Deprecated_Inline}} {{Non-standard_Inline}} -- {{SVGAttr("viewTarget")}} {{Deprecated_Inline}} ## Example diff --git a/files/jsondata/SVGData.json b/files/jsondata/SVGData.json index 79c7835f17fab9c..abf80920b4aacd3 100644 --- a/files/jsondata/SVGData.json +++ b/files/jsondata/SVGData.json @@ -1739,8 +1739,7 @@ "'externalResourcesRequired'", "'viewBox'", "'preserveAspectRatio'", - "'zoomAndPan'", - "'viewTarget'" + "'zoomAndPan'" ], "interfaces": ["SVGViewElement"] }, From 676b6ef50b4e4ca45149e5942a21a538fa5c9119 Mon Sep 17 00:00:00 2001 From: Florian Scholz Date: Tue, 19 Dec 2023 13:57:32 +0100 Subject: [PATCH 5/6] Bluetooth availabilitychange event isn't supported anywhere (#31149) --- files/en-us/_redirects.txt | 1 - .../availabilitychanged_event/index.md | 57 ------------------- files/en-us/web/api/bluetooth/index.md | 5 -- 3 files changed, 63 deletions(-) delete mode 100644 files/en-us/web/api/bluetooth/availabilitychanged_event/index.md diff --git a/files/en-us/_redirects.txt b/files/en-us/_redirects.txt index f3913ed5168ea77..75fd70e55bbc2fc 100644 --- a/files/en-us/_redirects.txt +++ b/files/en-us/_redirects.txt @@ -7587,7 +7587,6 @@ /en-US/docs/Web/API/BlobBuilder /en-US/docs/Web/API/Blob /en-US/docs/Web/API/BlobEvent.BlobEvent /en-US/docs/Web/API/BlobEvent/BlobEvent /en-US/docs/Web/API/BlobEvent.data /en-US/docs/Web/API/BlobEvent/data -/en-US/docs/Web/API/Bluetooth/onavailabilitychanged /en-US/docs/Web/API/Bluetooth/availabilitychanged_event /en-US/docs/Web/API/BluetoothAdvertisingData /en-US/docs/Web/API/Web_Bluetooth_API /en-US/docs/Web/API/BluetoothAdvertisingData/appearance /en-US/docs/Web/API/Web_Bluetooth_API /en-US/docs/Web/API/BluetoothAdvertisingData/manufacturerData /en-US/docs/Web/API/Web_Bluetooth_API diff --git a/files/en-us/web/api/bluetooth/availabilitychanged_event/index.md b/files/en-us/web/api/bluetooth/availabilitychanged_event/index.md deleted file mode 100644 index fe16f35a80ba675..000000000000000 --- a/files/en-us/web/api/bluetooth/availabilitychanged_event/index.md +++ /dev/null @@ -1,57 +0,0 @@ ---- -title: "Bluetooth: availabilitychanged event" -short-title: availabilitychanged -slug: Web/API/Bluetooth/availabilitychanged_event -page-type: web-api-event -status: - - experimental -browser-compat: api.Bluetooth.availabilitychanged_event ---- - -{{APIRef("Bluetooth API")}}{{securecontext_header}}{{SeeCompatTable}} - -The `availabilitychanged` event fires when the Bluetooth system as a whole becomes available or unavailable to the {{Glossary("User Agent")}}. - -## Syntax - -Use the event name in methods like {{domxref("EventTarget.addEventListener", "addEventListener()")}}, or set an event handler property. - -```js-nolint -addEventListener("availabilitychanged", (event) => { }) - -onavailabilitychanged = (event) => { } -``` - -## Event type - -A generic {{domxref("Event")}}. - -## Examples - -To be informed when Bluetooth availability changes, you can add a handler to your {{domxref("Bluetooth")}} instance using {{domxref("EventTarget.addEventListener", "addEventListener()")}}, like this: - -```js -Bluetooth.addEventListener("availabilitychanged", (event) => { - const availability = event.value; -}); -``` - -Alternatively, you can use the `Bluetooth.onavailabilitychanged` event handler property to establish a handler for the `availabilitychanged` event: - -```js -Bluetooth.onavailabilitychanged = (event) => { - const availability = event.value; -}; -``` - -## Specifications - -{{Specifications}} - -## Browser compatibility - -{{Compat}} - -## See also - -- {{DOMxRef("Bluetooth.getAvailability")}} diff --git a/files/en-us/web/api/bluetooth/index.md b/files/en-us/web/api/bluetooth/index.md index 1a950ff8d12171f..41c043dfbb6a5e0 100644 --- a/files/en-us/web/api/bluetooth/index.md +++ b/files/en-us/web/api/bluetooth/index.md @@ -34,11 +34,6 @@ _Inherits properties from its parent {{domxref("EventTarget")}}._ - : Returns a {{jsxref("Promise")}} to a {{domxref("BluetoothDevice")}} object with the specified options. -## Events - -- {{domxref("Bluetooth.availabilitychanged_event", "availabilitychanged")}} {{Experimental_Inline}} - - : An event that fires when Bluetooth capabilities have changed in availability. - ## Specifications {{Specifications}} From 53b19adf7936b1830f407813c3252b35c5eb925e Mon Sep 17 00:00:00 2001 From: SphinxKnight Date: Tue, 19 Dec 2023 14:03:03 +0100 Subject: [PATCH 6/6] Reorg and polish HTTP Headers landing page (#31146) --- files/en-us/web/http/headers/index.md | 309 ++++++++++++-------------- 1 file changed, 136 insertions(+), 173 deletions(-) diff --git a/files/en-us/web/http/headers/index.md b/files/en-us/web/http/headers/index.md index 5ed69d94ae65466..e4d19d0bf63b8fa 100644 --- a/files/en-us/web/http/headers/index.md +++ b/files/en-us/web/http/headers/index.md @@ -12,24 +12,17 @@ Custom proprietary headers have historically been used with an `X-` prefix, but Headers can be grouped according to their contexts: -- {{Glossary("Request header", "Request headers")}} contain more information about the resource to be fetched, or about the client requesting the resource. -- {{Glossary("Response header", "Response headers")}} hold additional information about the response, like its location or about the server providing it. -- {{Glossary("Representation header", "Representation headers")}} contain information about the body of the resource, like its [MIME type](/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types), or encoding/compression applied. -- {{Glossary("Payload header","Payload headers")}} contain representation-independent information about payload data, including content length and the encoding used for transport. +- {{Glossary("Request header", "Request headers")}} + - : Contain more information about the resource to be fetched, or about the client requesting the resource. +- {{Glossary("Response header", "Response headers")}} + - : Hold additional information about the response, like its location or about the server providing it. +- {{Glossary("Representation header", "Representation headers")}} + - : Contain information about the body of the resource, like its [MIME type](/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types), or encoding/compression applied. +- {{Glossary("Payload header","Payload headers")}} + - : Contain representation-independent information about payload data, including content length and the encoding used for transport. Headers can also be grouped according to how {{Glossary("Proxy_server", "proxies")}} handle them: -- {{ httpheader("Connection") }} -- {{ httpheader("Keep-Alive") }} -- {{ httpheader("Proxy-Authenticate") }} -- {{ httpheader("Proxy-Authorization") }} -- {{ httpheader("TE") }} -- {{ httpheader("Trailer") }} -- {{ httpheader("Transfer-Encoding") }} -- {{ httpheader("Upgrade") }} (see also [Protocol upgrade mechanism](/en-US/docs/Web/HTTP/Protocol_upgrade_mechanism)). - - - - End-to-end headers - : These headers _must_ be transmitted to the final recipient of the message: the server for a request, or the client for a response. Intermediate proxies must retransmit these headers unmodified and caches must store them. - Hop-by-hop headers @@ -56,78 +49,6 @@ Headers can also be grouped according to how {{Glossary("Proxy_server", "proxies - : Clears browsing data (e.g. cookies, storage, cache) associated with the requesting website. - {{HTTPHeader("Expires")}} - : The date/time after which the response is considered stale. -- {{HTTPHeader("Pragma")}} - - : Implementation-specific header that may have various effects anywhere along the request-response chain. Used for backwards compatibility with HTTP/1.0 caches where the `Cache-Control` header is not yet present. -- {{HTTPHeader("Warning")}} {{deprecated_inline}} - - : General warning information about possible problems. - -## Client hints - -HTTP [Client hints](/en-US/docs/Web/HTTP/Client_hints) are a set of request headers that provide useful information about the client such as device type and network conditions, and allow servers to optimize what is served for those conditions. - -Servers proactively requests the client hint headers they are interested in from the client using {{HTTPHeader("Accept-CH")}}. The client may then choose to include the requested headers in subsequent requests. - -- {{HTTPHeader("Accept-CH")}} {{experimental_inline}} - - : Servers can advertise support for Client Hints using the `Accept-CH` header field or an equivalent HTML `` element with [`http-equiv`](/en-US/docs/Web/HTML/Element/meta#http-equiv) attribute. -- {{HTTPHeader("Accept-CH-Lifetime")}} {{experimental_inline}} {{deprecated_inline}} - - : Servers can ask the client to remember the set of Client Hints that the server supports for a specified period of time, to enable delivery of Client Hints on subsequent requests to the server's origin. -- {{HTTPHeader("Critical-CH")}} {{experimental_inline}} - - : Servers use `Critical-CH` along with {{HttpHeader("Accept-CH")}} to specify that accepted client hints are also [critical client hints](/en-US/docs/Web/HTTP/Client_hints#critical_client_hints). - -The different categories of client hints are listed below. - -### User agent client hints - -The [UA client hints](/en-US/docs/Web/HTTP/Client_hints#user-agent_client_hints) are request headers that provide information about the user agent, the platform/architecture it is running on, and user preferences set on the user agent or platform: - -- {{HTTPHeader("Sec-CH-UA")}} {{experimental_inline}} - - : User agent's branding and version. -- {{HTTPHeader("Sec-CH-UA-Arch")}} {{experimental_inline}} - - : User agent's underlying platform architecture. -- {{HTTPHeader("Sec-CH-UA-Bitness")}} {{experimental_inline}} - - : User agent's underlying CPU architecture bitness (for example "64" bit). -- {{HTTPHeader("Sec-CH-UA-Full-Version")}} {{deprecated_inline}} - - : User agent's full semantic version string. -- {{HTTPHeader("Sec-CH-UA-Full-Version-List")}} {{experimental_inline}} - - : Full version for each brand in the user agent's brand list. -- {{HTTPHeader("Sec-CH-UA-Mobile")}} {{experimental_inline}} - - : User agent is running on a mobile device or, more generally, prefers a "mobile" user experience. -- {{HTTPHeader("Sec-CH-UA-Model")}} {{experimental_inline}} - - : User agent's device model. -- {{HTTPHeader("Sec-CH-UA-Platform")}} {{experimental_inline}} - - : User agent's underlying operation system/platform. -- {{HTTPHeader("Sec-CH-UA-Platform-Version")}} {{experimental_inline}} - - : User agent's underlying operation system version. -- {{HTTPHeader("Sec-CH-UA-Prefers-Color-Scheme")}} {{experimental_inline}} - - : User's preference of dark or light color scheme. -- {{HTTPHeader("Sec-CH-UA-Prefers-Reduced-Motion")}} {{experimental_inline}} - - : User's preference to see fewer animations and content layout shifts. - -### Device client hints - -- {{HTTPHeader("Content-DPR")}} {{deprecated_inline}} - - : _Response header_ used to confirm the image device to pixel ratio in requests where the {{HTTPHeader("DPR")}} client hint was used to select an image resource. -- {{HTTPHeader("Device-Memory")}} - - : Approximate amount of available client RAM memory. This is part of the [Device Memory API](/en-US/docs/Web/API/Device_Memory_API). -- {{HTTPHeader("DPR")}} {{deprecated_inline}} - - : Client device pixel ratio (DPR), which is the number of physical device pixels corresponding to every CSS pixel. -- {{HTTPHeader("Viewport-Width")}} {{deprecated_inline}} - - : A number that indicates the layout viewport width in CSS pixels. The provided pixel value is a number rounded to the smallest following integer (i.e. ceiling value). -- {{HTTPHeader("Width")}} {{deprecated_inline}} - - : A number that indicates the desired resource width in physical pixels (i.e. intrinsic size of an image). - -### Network client hints - -Network client hints allow a server to choose what information is sent based on the user choice and network bandwidth and latency. - -- {{HTTPHeader("Downlink")}} - - : Approximate bandwidth of the client's connection to the server, in Mbps. This is part of the [Network Information API](/en-US/docs/Web/API/Network_Information_API). -- {{HTTPHeader("ECT")}} - - : The {{Glossary("effective connection type")}} ("network profile") that best matches the connection's latency and bandwidth. This is part of the [Network Information API](/en-US/docs/Web/API/Network_Information_API). -- {{HTTPHeader("RTT")}} - - : Application layer round trip time (RTT) in milliseconds, which includes the server processing time. This is part of the [Network Information API](/en-US/docs/Web/API/Network_Information_API). -- {{HTTPHeader("Save-Data")}} {{experimental_inline}} - - : A string `on` that indicates the user agent's preference for reduced data usage. ## Conditionals @@ -155,7 +76,7 @@ Network client hints allow a server to choose what information is sent based on ## Content negotiation -[Content negotiation](/en-US/docs/Web/HTTP/Content_negotiation) headers. +For more details, refer to the [Content negotiation article](/en-US/docs/Web/HTTP/Content_negotiation). - {{HTTPHeader("Accept")}} - : Informs the server about the {{Glossary("MIME_type", "types")}} of data that can be sent back. @@ -180,16 +101,16 @@ Network client hints allow a server to choose what information is sent based on ## CORS -_Learn more about CORS [here](/en-US/docs/Glossary/CORS)._ +For more information, refer to the [CORS documentation](/en-US/docs/Web/HTTP/CORS). -- {{HTTPHeader("Access-Control-Allow-Origin")}} - - : Indicates whether the response can be shared. - {{HTTPHeader("Access-Control-Allow-Credentials")}} - : Indicates whether the response to the request can be exposed when the credentials flag is true. - {{HTTPHeader("Access-Control-Allow-Headers")}} - : Used in response to a {{Glossary("Preflight_request", "preflight request")}} to indicate which HTTP headers can be used when making the actual request. - {{HTTPHeader("Access-Control-Allow-Methods")}} - : Specifies the methods allowed when accessing the resource in response to a preflight request. +- {{HTTPHeader("Access-Control-Allow-Origin")}} + - : Indicates whether the response can be shared. - {{HTTPHeader("Access-Control-Expose-Headers")}} - : Indicates which headers can be exposed as part of the response by listing their names. - {{HTTPHeader("Access-Control-Max-Age")}} @@ -225,20 +146,9 @@ _Learn more about CORS [here](/en-US/docs/Glossary/CORS)._ - {{HTTPHeader("Forwarded")}} - : Contains information from the client-facing side of proxy servers that is altered or lost when a proxy is involved in the path of the request. -- {{HTTPHeader("X-Forwarded-For")}} {{non-standard_inline}} - - : Identifies the originating IP addresses of a client connecting to a web server through an HTTP proxy or a load balancer. -- {{HTTPHeader("X-Forwarded-Host")}} {{non-standard_inline}} - - : Identifies the original host requested that a client used to connect to your proxy or load balancer. -- {{HTTPHeader("X-Forwarded-Proto")}} {{non-standard_inline}} - - : Identifies the protocol (HTTP or HTTPS) that a client used to connect to your proxy or load balancer. - {{HTTPHeader("Via")}} - : Added by proxies, both forward and reverse proxies, and can appear in the request headers and the response headers. -## Privacy - -- {{HTTPHeader("Sec-GPC")}} {{non-standard_inline}}{{experimental_inline}} - - : Indicates whether the user consents to a website or service selling or sharing their personal information with third parties. - ## Redirects - {{HTTPHeader("Location")}} @@ -257,7 +167,7 @@ _Learn more about CORS [here](/en-US/docs/Glossary/CORS)._ - {{HTTPHeader("Referrer-Policy")}} - : Governs which referrer information sent in the {{HTTPHeader("Referer")}} header should be included with requests made. - {{HTTPHeader("User-Agent")}} - - : Contains a characteristic string that allows the network protocol peers to identify the application type, operating system, software vendor or software version of the requesting software user agent. See also the [Firefox user agent string reference](/en-US/docs/Web/HTTP/Headers/User-Agent/Firefox). + - : Contains a characteristic string that allows the network protocol peers to identify the application type, operating system, software vendor or software version of the requesting software user agent. ## Response context @@ -284,15 +194,11 @@ _Learn more about CORS [here](/en-US/docs/Glossary/CORS)._ - {{HTTPHeader("Cross-Origin-Opener-Policy")}} (COOP) - : Prevents other domains from opening/controlling a window. - {{HTTPHeader("Cross-Origin-Resource-Policy")}} (CORP) - - : Prevents other domains from reading the response of the resources to which this header is applied. + - : Prevents other domains from reading the response of the resources to which this header is applied. See also [CORP explainer article](/en-US/docs/Web/HTTP/Cross-Origin_Resource_Policy). - {{HTTPHeader("Content-Security-Policy")}} ({{Glossary("CSP")}}) - : Controls resources the user agent is allowed to load for a given page. - {{HTTPHeader("Content-Security-Policy-Report-Only")}} - : Allows web developers to experiment with policies by monitoring, but not enforcing, their effects. These violation reports consist of {{Glossary("JSON")}} documents sent via an HTTP `POST` request to the specified URI. -- {{HTTPHeader("Expect-CT")}} - - : Allows sites to opt in to reporting and/or enforcement of Certificate Transparency requirements, which prevents the use of misissued certificates for that site from going unnoticed. When a site enables the Expect-CT header, they are requesting that Chrome check that any certificate for that site appears in public CT logs. -- {{HTTPHeader("Origin-Isolation")}} {{experimental_inline}} - - : Provides a mechanism to allow web applications to isolate their origins. - {{HTTPHeader("Permissions-Policy")}} - : Provides a mechanism to allow and deny the use of browser features in a website's own frame, and in {{htmlelement("iframe")}}s that it embeds. - {{HTTPHeader("Strict-Transport-Security")}} ({{Glossary("HSTS")}}) @@ -312,42 +218,26 @@ _Learn more about CORS [here](/en-US/docs/Glossary/CORS)._ ### Fetch metadata request headers -{{Glossary("Fetch metadata request header", "Fetch metadata request headers")}} provide information about the context from which the request originated. -A server can use them to make decisions about whether a request should be allowed, based on where the request came from and how the resource will be used. +{{Glossary("Fetch metadata request header", "Fetch metadata request headers")}} provide information about the context from which the request originated. A server can use them to make decisions about whether a request should be allowed, based on where the request came from and how the resource will be used. - {{HTTPHeader("Sec-Fetch-Site")}} - - : Indicates the relationship between a request initiator's origin and its target's origin. - It is a Structured Header whose value is a token with possible values `cross-site`, `same-origin`, `same-site`, and `none`. + - : Indicates the relationship between a request initiator's origin and its target's origin. It is a Structured Header whose value is a token with possible values `cross-site`, `same-origin`, `same-site`, and `none`. - {{HTTPHeader("Sec-Fetch-Mode")}} - - : Indicates the request's mode to a server. - It is a Structured Header whose value is a token with possible values `cors`, `navigate`, `no-cors`, `same-origin`, and `websocket`. + - : Indicates the request's mode to a server. It is a Structured Header whose value is a token with possible values `cors`, `navigate`, `no-cors`, `same-origin`, and `websocket`. - {{HTTPHeader("Sec-Fetch-User")}} - - : Indicates whether or not a navigation request was triggered by user activation. - It is a Structured Header whose value is a boolean so possible values are `?0` for false and `?1` for true. + - : Indicates whether or not a navigation request was triggered by user activation. It is a Structured Header whose value is a boolean so possible values are `?0` for false and `?1` for true. - {{HTTPHeader("Sec-Fetch-Dest")}} - - : Indicates the request's destination. - It is a Structured Header whose value is a token with possible values `audio`, `audioworklet`, `document`, `embed`, `empty`, `font`, `image`, `manifest`, `object`, `paintworklet`, `report`, `script`, `serviceworker`, `sharedworker`, `style`, `track`, `video`, `worker`, and `xslt`. + - : Indicates the request's destination. It is a Structured Header whose value is a token with possible values `audio`, `audioworklet`, `document`, `embed`, `empty`, `font`, `image`, `manifest`, `object`, `paintworklet`, `report`, `script`, `serviceworker`, `sharedworker`, `style`, `track`, `video`, `worker`, and `xslt`. -The following request headers are not _strictly_ "fetch metadata request headers", but similarly provide information about the context of how a resource will be used. -A server might use them to modify its caching behavior, or the information that is returned: +The following request headers are not _strictly_ "fetch metadata request headers", but similarly provide information about the context of how a resource will be used. A server might use them to modify its caching behavior, or the information that is returned: -- {{HTTPHeader("Sec-Purpose")}} {{Experimental_Inline}} - - : Indicates the purpose of the request, when the purpose is something other than immediate use by the user-agent. - The header currently has one possible value, `prefetch`, which indicates that the resource is being fetched preemptively for a possible future navigation. +- {{HTTPHeader("Sec-Purpose")}} + - : Indicates the purpose of the request, when the purpose is something other than immediate use by the user-agent. The header currently has one possible value, `prefetch`, which indicates that the resource is being fetched preemptively for a possible future navigation. - {{HTTPHeader("Service-Worker-Navigation-Preload")}} - - : A request header sent in preemptive request to {{domxref("fetch()")}} a resource during service worker boot. - The value, which is set with {{domxref("NavigationPreloadManager.setHeaderValue()")}}, can be used to inform a server that a different resource should be returned than in a normal `fetch()` operation. + - : A request header sent in preemptive request to {{domxref("fetch()")}} a resource during service worker boot. The value, which is set with {{domxref("NavigationPreloadManager.setHeaderValue()")}}, can be used to inform a server that a different resource should be returned than in a normal `fetch()` operation. ## Server-sent events -- {{HTTPHeader("Last-Event-ID")}} - - : TBD -- {{HTTPHeader("NEL")}} {{experimental_inline}} - - : Defines a mechanism that enables developers to declare a network error reporting policy. -- {{HTTPHeader("Ping-From")}} - - : TBD -- {{HTTPHeader("Ping-To")}} - - : TBD - {{HTTPHeader("Report-To")}} - : Used to specify a server endpoint for the browser to send warning and error reports to. @@ -360,70 +250,143 @@ A server might use them to modify its caching behavior, or the information that - {{HTTPHeader("Trailer")}} - : Allows the sender to include additional fields at the end of chunked message. -## WebSockets - -- {{HTTPHeader("Sec-WebSocket-Key")}} - - : TBD -- {{HTTPHeader("Sec-WebSocket-Extensions")}} - - : TBD -- {{HTTPHeader("Sec-WebSocket-Accept")}} - - : TBD -- {{HTTPHeader("Sec-WebSocket-Protocol")}} - - : TBD -- {{HTTPHeader("Sec-WebSocket-Version")}} - - : TBD - ## Other -- {{HTTPHeader("Accept-Push-Policy")}} {{experimental_inline}} - - : A client can express the desired push policy for a request by sending an [`Accept-Push-Policy`](https://datatracker.ietf.org/doc/html/draft-ruellan-http-accept-push-policy-00#section-3.1) header field in the request. -- {{HTTPHeader("Accept-Signature")}} {{experimental_inline}} - - : A client can send the [`Accept-Signature`](https://wicg.github.io/webpackage/draft-yasskin-http-origin-signed-responses.html#rfc.section.3.7) header field to indicate intention to take advantage of any available signatures and to indicate what kinds of signatures it supports. - {{HTTPHeader("Alt-Svc")}} - : Used to list alternate ways to reach this service. - {{HTTPHeader("Alt-Used")}} - : Used to identify the alternative service in use. - {{HTTPHeader("Date")}} - : Contains the date and time at which the message was originated. -- {{HTTPHeader("Early-Data")}} {{experimental_inline}} - - : Indicates that the request has been conveyed in TLS early data. -- {{HTTPHeader("Large-Allocation")}} {{deprecated_inline}} - - : Tells the browser that the page being loaded is going to want to perform a large allocation. - {{HTTPHeader("Link")}} - - : The [`Link`](https://datatracker.ietf.org/doc/html/rfc5988#section-5) entity-header field provides a means for serializing one or more links in HTTP headers. It is semantically equivalent to the HTML {{HTMLElement("link")}} element. -- {{HTTPHeader("Push-Policy")}} {{experimental_inline}} - - : A [`Push-Policy`](https://datatracker.ietf.org/doc/html/draft-ruellan-http-accept-push-policy-00#section-3.2) defines the server behavior regarding push when processing a request. + - : This entity-header field provides a means for serializing one or more links in HTTP headers. It is semantically equivalent to the HTML {{HTMLElement("link")}} element. - {{HTTPHeader("Retry-After")}} - : Indicates how long the user agent should wait before making a follow-up request. -- {{HTTPHeader("Signature")}} {{experimental_inline}} - - : The [`Signature`](https://wicg.github.io/webpackage/draft-yasskin-http-origin-signed-responses.html#rfc.section.3.1) header field conveys a list of signatures for an exchange, each one accompanied by information about how to determine the authority of and refresh that signature. -- {{HTTPHeader("Signed-Headers")}} {{experimental_inline}} - - : The [`Signed-Headers`](https://wicg.github.io/webpackage/draft-yasskin-http-origin-signed-responses.html#rfc.section.5.1.2) header field identifies an ordered list of response header fields to include in a signature. - {{HTTPHeader("Server-Timing")}} - : Communicates one or more metrics and descriptions for the given request-response cycle. - {{HTTPHeader("Service-Worker-Allowed")}} - - : Used to remove the [path restriction](https://w3c.github.io/ServiceWorker/#path-restriction) by including this header [in the response of the Service Worker script](https://w3c.github.io/ServiceWorker/#service-worker-script-response). + - : Used to remove the [path restriction](/en-US/docs/Web/API/Service_Worker_API/Using_Service_Workers#why_is_my_service_worker_failing_to_register) by including this header [in the response of the Service Worker script](https://w3c.github.io/ServiceWorker/#service-worker-script-response). - {{HTTPHeader("SourceMap")}} - : Links generated code to a [source map](https://firefox-source-docs.mozilla.org/devtools-user/debugger/how_to/use_a_source_map/index.html). -- [`Supports-Loading-Mode`](/en-US/docs/Web/HTTP/Headers/Supports-Loading-Mode) - - : Set by a navigation target to opt-in to using various higher-risk loading modes. For example, cross-origin, same-site [prerendering](/en-US/docs/Web/API/Speculation_Rules_API#using_prerendering) requires a `Supports-Loading-Mode` value of `credentialed-prerender`. - {{HTTPHeader("Upgrade")}} - - : The relevant RFC document for the [Upgrade header field is RFC 9110, section 7.8](https://httpwg.org/specs/rfc9110.html#field.upgrade). The standard establishes rules for upgrading or changing to a different protocol on the current client, server, transport protocol connection. For example, this header standard allows a client to change from HTTP 1.1 to [WebSocket](/en-US/docs/Glossary/WebSockets), assuming the server decides to acknowledge and implement the Upgrade header field. Neither party is required to accept the terms specified in the Upgrade header field. It can be used in both client and server headers. If the Upgrade header field is specified, then the sender MUST also send the Connection header field with the upgrade option specified. For details on the Connection header field [please see section 7.6.1 of the aforementioned RFC](https://httpwg.org/specs/rfc9110.html#field.connection). -- {{HTTPHeader("X-DNS-Prefetch-Control")}} + - : This HTTP/1.1 (only) header can be used to upgrade an already established client/server connection to a different protocol (over the same transport protocol). For example, it can be used by a client to upgrade a connection from HTTP 1.1 to HTTP 2.0, or an HTTP or HTTPS connection into a WebSocket. + +## Experimental headers + +### Client hints + +HTTP [Client hints](/en-US/docs/Web/HTTP/Client_hints) are a set of request headers that provide useful information about the client such as device type and network conditions, and allow servers to optimize what is served for those conditions. + +Servers proactively requests the client hint headers they are interested in from the client using {{HTTPHeader("Accept-CH")}}. The client may then choose to include the requested headers in subsequent requests. + +- {{HTTPHeader("Accept-CH")}} {{experimental_inline}} + - : Servers can advertise support for Client Hints using the `Accept-CH` header field or an equivalent HTML `` element with [`http-equiv`](/en-US/docs/Web/HTML/Element/meta#http-equiv) attribute. +- {{HTTPHeader("Critical-CH")}} {{experimental_inline}} + - : Servers use `Critical-CH` along with {{HttpHeader("Accept-CH")}} to specify that accepted client hints are also [critical client hints](/en-US/docs/Web/HTTP/Client_hints#critical_client_hints). + +The different categories of client hints are listed below. + +#### User agent client hints + +The [UA client hints](/en-US/docs/Web/HTTP/Client_hints#user-agent_client_hints) are request headers that provide information about the user agent, the platform/architecture it is running on, and user preferences set on the user agent or platform: + +- {{HTTPHeader("Sec-CH-UA")}} {{experimental_inline}} + - : User agent's branding and version. +- {{HTTPHeader("Sec-CH-UA-Arch")}} {{experimental_inline}} + - : User agent's underlying platform architecture. +- {{HTTPHeader("Sec-CH-UA-Bitness")}} {{experimental_inline}} + - : User agent's underlying CPU architecture bitness (for example "64" bit). +- {{HTTPHeader("Sec-CH-UA-Full-Version-List")}} {{experimental_inline}} + - : Full version for each brand in the user agent's brand list. +- {{HTTPHeader("Sec-CH-UA-Mobile")}} {{experimental_inline}} + - : User agent is running on a mobile device or, more generally, prefers a "mobile" user experience. +- {{HTTPHeader("Sec-CH-UA-Model")}} {{experimental_inline}} + - : User agent's device model. +- {{HTTPHeader("Sec-CH-UA-Platform")}} {{experimental_inline}} + - : User agent's underlying operation system/platform. +- {{HTTPHeader("Sec-CH-UA-Platform-Version")}} {{experimental_inline}} + - : User agent's underlying operation system version. +- {{HTTPHeader("Sec-CH-UA-Prefers-Color-Scheme")}} {{experimental_inline}} + - : User's preference of dark or light color scheme. +- {{HTTPHeader("Sec-CH-UA-Prefers-Reduced-Motion")}} {{experimental_inline}} + - : User's preference to see fewer animations and content layout shifts. + +#### Device client hints + +- {{HTTPHeader("Device-Memory")}} {{experimental_inline}} + - : Approximate amount of available client RAM memory. This is part of the [Device Memory API](/en-US/docs/Web/API/Device_Memory_API). + +#### Network client hints + +Network client hints allow a server to choose what information is sent based on the user choice and network bandwidth and latency. + +- {{HTTPHeader("Downlink")}} {{experimental_inline}} + - : Approximate bandwidth of the client's connection to the server, in Mbps. This is part of the [Network Information API](/en-US/docs/Web/API/Network_Information_API). +- {{HTTPHeader("ECT")}} {{experimental_inline}} + - : The {{Glossary("effective connection type")}} ("network profile") that best matches the connection's latency and bandwidth. This is part of the [Network Information API](/en-US/docs/Web/API/Network_Information_API). +- {{HTTPHeader("RTT")}} {{experimental_inline}} + - : Application layer round trip time (RTT) in milliseconds, which includes the server processing time. This is part of the [Network Information API](/en-US/docs/Web/API/Network_Information_API). +- {{HTTPHeader("Save-Data")}} {{experimental_inline}} + - : A string `on` that indicates the user agent's preference for reduced data usage. + +### Privacy + +- {{HTTPHeader("Sec-GPC")}} {{non-standard_inline}}{{experimental_inline}} + - : Indicates whether the user consents to a website or service selling or sharing their personal information with third parties. + +### Security + +- {{HTTPHeader("Origin-Isolation")}} {{experimental_inline}} + - : Provides a mechanism to allow web applications to isolate their origins. + +### Server-sent events + +- {{HTTPHeader("NEL")}} {{experimental_inline}} + - : Defines a mechanism that enables developers to declare a network error reporting policy. + +### Other + +- {{HTTPHeader("Accept-Push-Policy")}} {{experimental_inline}} + - : A client can express the desired push policy for a request by sending an [`Accept-Push-Policy`](https://datatracker.ietf.org/doc/html/draft-ruellan-http-accept-push-policy-00#section-3.1) header field in the request. +- {{HTTPHeader("Accept-Signature")}} {{experimental_inline}} + - : A client can send the [`Accept-Signature`](https://wicg.github.io/webpackage/draft-yasskin-http-origin-signed-responses.html#rfc.section.3.7) header field to indicate intention to take advantage of any available signatures and to indicate what kinds of signatures it supports. +- {{HTTPHeader("Early-Data")}} {{experimental_inline}} + - : Indicates that the request has been conveyed in TLS early data. +- {{HTTPHeader("Push-Policy")}} {{experimental_inline}} + - : A [`Push-Policy`](https://datatracker.ietf.org/doc/html/draft-ruellan-http-accept-push-policy-00#section-3.2) defines the server behavior regarding push when processing a request. +- {{HTTPHeader("Signature")}} {{experimental_inline}} + - : The [`Signature`](https://wicg.github.io/webpackage/draft-yasskin-http-origin-signed-responses.html#rfc.section.3.1) header field conveys a list of signatures for an exchange, each one accompanied by information about how to determine the authority of and refresh that signature. +- {{HTTPHeader("Signed-Headers")}} {{experimental_inline}} + - : The [`Signed-Headers`](https://wicg.github.io/webpackage/draft-yasskin-http-origin-signed-responses.html#rfc.section.5.1.2) header field identifies an ordered list of response header fields to include in a signature. +- {{HTTPHeader("Supports-Loading-Mode")}} {{experimental_inline}} + - : Set by a navigation target to opt-in to using various higher-risk loading modes. For example, cross-origin, same-site [prerendering](/en-US/docs/Web/API/Speculation_Rules_API#using_prerendering) requires a `Supports-Loading-Mode` value of `credentialed-prerender`. + +## Non-standard headers + +- {{HTTPHeader("X-Forwarded-For")}} {{non-standard_inline}} + - : Identifies the originating IP addresses of a client connecting to a web server through an HTTP proxy or a load balancer. +- {{HTTPHeader("X-Forwarded-Host")}} {{non-standard_inline}} + - : Identifies the original host requested that a client used to connect to your proxy or load balancer. +- {{HTTPHeader("X-Forwarded-Proto")}} {{non-standard_inline}} + - : Identifies the protocol (HTTP or HTTPS) that a client used to connect to your proxy or load balancer. +- {{HTTPHeader("X-DNS-Prefetch-Control")}} {{non-standard_inline}} - : Controls DNS prefetching, a feature by which browsers proactively perform domain name resolution on both links that the user may choose to follow as well as URLs for items referenced by the document, including images, CSS, JavaScript, and so forth. -- {{HTTPHeader("X-Firefox-Spdy")}} {{deprecated_inline}} {{non-standard_inline}} - - : TBD -- {{HTTPHeader("X-Pingback")}} {{non-standard_inline}} - - : TBD -- {{HTTPHeader("X-Requested-With")}} - - : TBD -- {{HTTPHeader("X-Robots-Tag")}}{{non-standard_inline}} +- {{HTTPHeader("X-Robots-Tag")}} {{non-standard_inline}} - : The [`X-Robots-Tag`](https://developers.google.com/search/docs/advanced/robots/robots_meta_tag) HTTP header is used to indicate how a web page is to be indexed within public search engine results. The header is effectively equivalent to ``. +## Deprecated headers + +- {{HTTPHeader("Pragma")}} {{deprecated_inline}} + - : Implementation-specific header that may have various effects anywhere along the request-response chain. Used for backwards compatibility with HTTP/1.0 caches where the `Cache-Control` header is not yet present. +- {{HTTPHeader("Warning")}} {{deprecated_inline}} + - : General warning information about possible problems. + ## Contributing You can help by [writing new entries](/en-US/docs/MDN/Writing_guidelines/Howto/Document_an_HTTP_header) or improving the existing ones. + + ## See also - [Wikipedia page on List of HTTP headers](https://en.wikipedia.org/wiki/List_of_HTTP_header_fields)