From 511f1173fa4e7a05a7abd6d92d9f0ef4e027f03a Mon Sep 17 00:00:00 2001 From: MDN Web Docs GitHub Bot <108879845+mdn-bot@users.noreply.github.com> Date: Tue, 27 Aug 2024 03:33:34 +0200 Subject: [PATCH 1/7] [es] sync translated content (#23272) es: sync translated content --- files/es/_redirects.txt | 9 ++++--- files/es/_wikihistory.json | 24 +++++++++---------- .../identifying_resources_on_the_web/index.md | 3 ++- .../index.md | 3 ++- .../data_urls => uri/schemes/data}/index.md | 3 ++- 5 files changed, 24 insertions(+), 18 deletions(-) rename files/es/{ => orphaned}/web/http/basics_of_http/identifying_resources_on_the_web/index.md (97%) rename files/es/web/{http/basics_of_http => uri/authority}/choosing_between_www_and_non-www_urls/index.md (97%) rename files/es/web/{http/basics_of_http/data_urls => uri/schemes/data}/index.md (98%) diff --git a/files/es/_redirects.txt b/files/es/_redirects.txt index b3dcc425f61dc5..e834b829476281 100644 --- a/files/es/_redirects.txt +++ b/files/es/_redirects.txt @@ -2198,9 +2198,12 @@ /es/docs/Web/HTML/microformatos /es/docs/Web/HTML/microformats /es/docs/Web/HTML/Índice /es/docs/Web/HTML /es/docs/Web/HTTP/Access_control_CORS /es/docs/Web/HTTP/CORS -/es/docs/Web/HTTP/Basics_of_HTTP/Data_URIs /es/docs/Web/HTTP/Basics_of_HTTP/Data_URLs -/es/docs/Web/HTTP/Basics_of_HTTP/Datos_URIs /es/docs/Web/HTTP/Basics_of_HTTP/Data_URLs -/es/docs/Web/HTTP/Basics_of_HTTP/Identificación_recursos_en_la_Web /es/docs/Web/HTTP/Basics_of_HTTP/Identifying_resources_on_the_Web +/es/docs/Web/HTTP/Basics_of_HTTP/Choosing_between_www_and_non-www_URLs /es/docs/Web/URI/Authority/Choosing_between_www_and_non-www_URLs +/es/docs/Web/HTTP/Basics_of_HTTP/Data_URIs /es/docs/Web/URI/Schemes/data +/es/docs/Web/HTTP/Basics_of_HTTP/Data_URLs /es/docs/Web/URI/Schemes/data +/es/docs/Web/HTTP/Basics_of_HTTP/Datos_URIs /es/docs/Web/URI/Schemes/data +/es/docs/Web/HTTP/Basics_of_HTTP/Identificación_recursos_en_la_Web /es/docs/orphaned/Web/HTTP/Basics_of_HTTP/Identifying_resources_on_the_Web +/es/docs/Web/HTTP/Basics_of_HTTP/Identifying_resources_on_the_Web /es/docs/orphaned/Web/HTTP/Basics_of_HTTP/Identifying_resources_on_the_Web /es/docs/Web/HTTP/Basics_of_HTTP/MIME_types/Lista_completa_de_tipos_MIME /es/docs/Web/HTTP/Basics_of_HTTP/MIME_types/Common_types /es/docs/Web/HTTP/Gestion_de_la_conexion_en_HTTP_1.x /es/docs/Web/HTTP/Connection_management_in_HTTP_1.x /es/docs/Web/HTTP/Peticiones_condicionales /es/docs/Web/HTTP/Conditional_requests diff --git a/files/es/_wikihistory.json b/files/es/_wikihistory.json index 186b87bf17afe5..576d5ed68cc5f4 100644 --- a/files/es/_wikihistory.json +++ b/files/es/_wikihistory.json @@ -9424,22 +9424,10 @@ "cissoid" ] }, - "Web/HTTP/Basics_of_HTTP/Choosing_between_www_and_non-www_URLs": { - "modified": "2019-03-18T21:22:07.450Z", - "contributors": ["Adorta4", "carlosgocereceda"] - }, - "Web/HTTP/Basics_of_HTTP/Data_URLs": { - "modified": "2019-03-23T22:24:54.977Z", - "contributors": ["Sergio_Gonzalez_Collado", "AzazelN28", "uclides"] - }, "Web/HTTP/Basics_of_HTTP/Evolution_of_HTTP": { "modified": "2019-03-23T22:10:11.567Z", "contributors": ["Sergio_Gonzalez_Collado", "ChrisMHM"] }, - "Web/HTTP/Basics_of_HTTP/Identifying_resources_on_the_Web": { - "modified": "2019-03-23T22:24:51.387Z", - "contributors": ["DaniNz", "Sergio_Gonzalez_Collado", "ChrisMHM", "uclides"] - }, "Web/HTTP/Basics_of_HTTP/MIME_types": { "modified": "2019-11-18T08:03:54.325Z", "contributors": [ @@ -13449,6 +13437,14 @@ "diegogaysaez" ] }, + "Web/URI/Authority/Choosing_between_www_and_non-www_URLs": { + "modified": "2019-03-18T21:22:07.450Z", + "contributors": ["Adorta4", "carlosgocereceda"] + }, + "Web/URI/Schemes/data": { + "modified": "2019-03-23T22:24:54.977Z", + "contributors": ["Sergio_Gonzalez_Collado", "AzazelN28", "uclides"] + }, "Web/XML/Parsing_and_serializing_XML": { "modified": "2019-03-23T22:10:22.365Z", "contributors": ["FenixAlive"] @@ -15330,6 +15326,10 @@ "modified": "2019-03-23T22:46:15.359Z", "contributors": ["juanbrujo", "raecillacastellana", "vltamara"] }, + "orphaned/Web/HTTP/Basics_of_HTTP/Identifying_resources_on_the_Web": { + "modified": "2019-03-23T22:24:51.387Z", + "contributors": ["DaniNz", "Sergio_Gonzalez_Collado", "ChrisMHM", "uclides"] + }, "orphaned/Web/JavaScript/Reference/Errors/Undefined_prop": { "modified": "2020-03-12T19:47:46.684Z", "contributors": ["antixsuperstar"] diff --git a/files/es/web/http/basics_of_http/identifying_resources_on_the_web/index.md b/files/es/orphaned/web/http/basics_of_http/identifying_resources_on_the_web/index.md similarity index 97% rename from files/es/web/http/basics_of_http/identifying_resources_on_the_web/index.md rename to files/es/orphaned/web/http/basics_of_http/identifying_resources_on_the_web/index.md index 20aecc51608c75..5b581472cec232 100644 --- a/files/es/web/http/basics_of_http/identifying_resources_on_the_web/index.md +++ b/files/es/orphaned/web/http/basics_of_http/identifying_resources_on_the_web/index.md @@ -1,6 +1,7 @@ --- title: Identificación de recursos web -slug: Web/HTTP/Basics_of_HTTP/Identifying_resources_on_the_Web +slug: orphaned/Web/HTTP/Basics_of_HTTP/Identifying_resources_on_the_Web +original_slug: Web/HTTP/Basics_of_HTTP/Identifying_resources_on_the_Web --- {{HTTPSidebar}} diff --git a/files/es/web/http/basics_of_http/choosing_between_www_and_non-www_urls/index.md b/files/es/web/uri/authority/choosing_between_www_and_non-www_urls/index.md similarity index 97% rename from files/es/web/http/basics_of_http/choosing_between_www_and_non-www_urls/index.md rename to files/es/web/uri/authority/choosing_between_www_and_non-www_urls/index.md index de26f6bb111af7..a5c239f56dd645 100644 --- a/files/es/web/http/basics_of_http/choosing_between_www_and_non-www_urls/index.md +++ b/files/es/web/uri/authority/choosing_between_www_and_non-www_urls/index.md @@ -1,6 +1,7 @@ --- title: Elección entre www y no-www URLs -slug: Web/HTTP/Basics_of_HTTP/Choosing_between_www_and_non-www_URLs +slug: Web/URI/Authority/Choosing_between_www_and_non-www_URLs +original_slug: Web/HTTP/Basics_of_HTTP/Choosing_between_www_and_non-www_URLs --- {{HTTPSidebar}} diff --git a/files/es/web/http/basics_of_http/data_urls/index.md b/files/es/web/uri/schemes/data/index.md similarity index 98% rename from files/es/web/http/basics_of_http/data_urls/index.md rename to files/es/web/uri/schemes/data/index.md index b9ccaf8f807637..3e601ff63ecd25 100644 --- a/files/es/web/http/basics_of_http/data_urls/index.md +++ b/files/es/web/uri/schemes/data/index.md @@ -1,6 +1,7 @@ --- title: Datos URIs -slug: Web/HTTP/Basics_of_HTTP/Data_URLs +slug: Web/URI/Schemes/data +original_slug: Web/HTTP/Basics_of_HTTP/Data_URLs --- {{HTTPSidebar}} From 76b94f24f18c74801a7307e257f7a1cf06fadae1 Mon Sep 17 00:00:00 2001 From: Gahotx <53534938+Gahotx@users.noreply.github.com> Date: Tue, 27 Aug 2024 10:44:31 +0800 Subject: [PATCH 2/7] [zh-cn]: update the translation of the SVG attribute `stroke` (#23206) Co-authored-by: Jason Ren <40999116+jasonren0403@users.noreply.github.com> --- files/zh-cn/web/svg/attribute/stroke/index.md | 118 +++++++++++++++--- 1 file changed, 100 insertions(+), 18 deletions(-) diff --git a/files/zh-cn/web/svg/attribute/stroke/index.md b/files/zh-cn/web/svg/attribute/stroke/index.md index b016fd9b5219f6..afd48666808077 100644 --- a/files/zh-cn/web/svg/attribute/stroke/index.md +++ b/files/zh-cn/web/svg/attribute/stroke/index.md @@ -1,46 +1,128 @@ --- title: stroke slug: Web/SVG/Attribute/stroke +l10n: + sourceCommit: 47996becf4d78c721f29a3004ac613bd51c11ab8 --- {{SVGRef}} -`stroke` 属性定义了给定图形元素的外轮廓的颜色。它的默认值是 **`none`**。 +**`stroke`** 是一个表现属性,它定义了图形的外轮廓的颜色(_或者是任何 SVG 绘画方式,如渐变或图案_)。 -## 用法 +> [!NOTE] +> 作为一个表现属性,`stroke` 可以用作 CSS 属性。参见 {{cssxref('stroke')}} 以了解更多信息。 + +你可以将此属性与以下 SVG 元素一起使用: -| 类别 | 外观属性 | -| ------ | ----------------------------------------- | -| 值 | [\](/zh-CN/SVG/Content_type#Paint) | -| 可变性 | 是 | +- {{SVGElement('circle')}} +- {{SVGElement('ellipse')}} +- {{SVGElement('line')}} +- {{SVGElement('path')}} +- {{SVGElement('polygon')}} +- {{SVGElement('polyline')}} +- {{SVGElement('rect')}} +- {{SVGElement('text')}} +- {{SVGElement('textPath')}} +- {{SVGElement('tref')}} +- {{SVGElement('tspan')}} ## 示例 -## SVG 描边的线 +### 基础颜色和渐变色描边 -### 示例 1:用 stroke 属性画一条绿色的直线 +```css hidden +html, +body, +svg { + height: 100%; +} +``` ```html - - + + + + + + + + + + + + + ``` -### 示例 2:用 Stroke 属性画一个拥有蓝色边框的黑色的圆形 +输出如下: -```html - - +{{EmbedLiveSample("基础颜色和渐变色描边", '100%', 200)}} + +### `context-stroke` 示例 + +在这个示例中,我们使用 {{SVGElement('path')}} 元素定义了三个形状的图形,每个图形都设置了不同的 `stroke` 和 [`fill`](/zh-CN/docs/Web/SVG/Attribute/fill) 颜色。我们还通过 {{SVGElement('marker')}} 元素将 {{SVGElement('circle')}} 元素定义为标记。每个图形都通过 [`marker`](/zh-CN/docs/Web/CSS/marker) CSS 属性应用了标记。 + +{{SVGElement('circle')}} 元素上设置了 `stroke="context-stroke"` 和 `fill="context-fill"`。因为它被设置为图形的上下文标记,所以这些属性会导致它在各种情况下都会继承设置在 {{SVGElement('path')}} 元素上的 `fill` 和 `stroke`。 + +```html-nolint + + + + + + + + ``` -## 元素 +输出如下: -下列元素可以使用`stroke`属性: +{{EmbedLiveSample("`context-stroke` 示例", '100%', 220)}} -- [形状元素](/zh-CN/SVG/Element#Shape) » -- [文本内容元素](/zh-CN/SVG/Element#TextContent) » +> [!NOTE] +> 当元素被 {{SVGElement('use')}} 元素引用时,元素还可以使用 `context-stroke` 和 `context-fill` 来继承 `stroke` 和 `fill` 的值。 + +## 用法 + + + + + + + + + + + + + + + + +
+ <paint> +
默认值none
动画性
## 规范 {{Specifications}} + +## 浏览器兼容性 + +{{Compat}} From 227560dfa77b8a485d0a59319bb8641f4ede56f0 Mon Sep 17 00:00:00 2001 From: seeker Date: Mon, 26 Aug 2024 22:46:10 -0400 Subject: [PATCH 3/7] [es] Web/JavaScript/Reference/Global_Objects/Map/set (#23214) [es] translate map set --- .../reference/global_objects/map/set/index.md | 67 +++++++++++++++++++ 1 file changed, 67 insertions(+) create mode 100644 files/es/web/javascript/reference/global_objects/map/set/index.md diff --git a/files/es/web/javascript/reference/global_objects/map/set/index.md b/files/es/web/javascript/reference/global_objects/map/set/index.md new file mode 100644 index 00000000000000..b0c111f98fe52d --- /dev/null +++ b/files/es/web/javascript/reference/global_objects/map/set/index.md @@ -0,0 +1,67 @@ +--- +title: Map.prototype.set() +slug: Web/JavaScript/Reference/Global_Objects/Map/set +l10n: + sourceCommit: 3cfd663738e9963157d90f359789d675a6662ec2 +--- + +{{JSRef}} + +El método **`set()`** de las instancias {{jsxref("Map")}} agrega o actualiza una entrada en este _map_ con la llave y valor especificados. + +{{EmbedInteractiveExample("pages/js/map-prototype-set.html")}} + +## Sintaxis + +```js-nolint +set(key, value) +``` + +### Parámetros + +- `key` + - : La llave del elemento que se va a agregar al objeto `Map`. La llave puede ser cualquiera de los [tipos de dato de JavaScript](/es/docs/Web/JavaScript/Data_structures) (cualquier [valor primitivo](/es/docs/Web/JavaScript/Data_structures#valores_primitivos) o cualquier tipo de [objeto JavaScript](/es/docs/Web/JavaScript/Data_structures#objetos)). +- `value` + - : El valor de el elemento que se va a agregar al objeto `Map`. El valor puede ser cualquiera de los [tipos de dato de JavaScript](/es/docs/Web/JavaScript/Data_structures) (cualquier [valor primitivo](/es/docs/Web/JavaScript/Data_structures#valores_primitivos) o cualquier tipo de [objeto JavaScript](/es/docs/Web/JavaScript/Data_structures#objetos)). + +### Valor devuelto + +El objeto `Map`. + +## Ejemplos + +### Usando set() + +```js +const myMap = new Map(); + +// Agrega nuevos elementos a el map +myMap.set("bar", "foo"); +myMap.set(1, "foobar"); + +// Actualiza un elemento en el map +myMap.set("bar", "baz"); +``` + +### Usando set() encadenandolo + +Ya que el método `set()` regresa el mismo objeto `Map`, puedes encadenar la llamada al método como se muestra acontinuación: + +```js +// Agrega nuevos elementos al map, encadenando las llamadas. +myMap.set("bar", "foo").set(1, "foobar").set(2, "baz"); +``` + +## Especificaciones + +{{Specifications}} + +## Compatibilidad con navegadores + +{{Compat}} + +## Véase también + +- {{jsxref("Map")}} +- {{jsxref("Map.prototype.get()")}} +- {{jsxref("Map.prototype.has()")}} From c67a2b426b1690f7271872a8760814699f1b3661 Mon Sep 17 00:00:00 2001 From: MDN Web Docs GitHub Bot <108879845+mdn-bot@users.noreply.github.com> Date: Tue, 27 Aug 2024 06:22:54 +0200 Subject: [PATCH 4/7] [zh-cn] sync translated content (#23276) * zh-cn: sync translated content * Move URL related docs to the new area ref: mdn/content#35202 --------- Co-authored-by: allo --- files/zh-cn/_redirects.txt | 12 +- files/zh-cn/_wikihistory.json | 64 ++++------- files/zh-cn/glossary/base64/index.md | 6 +- .../web_mechanics/what_is_a_url/index.md | 4 +- .../api/document/fragmentdirective/index.md | 2 +- .../web/api/filereader/readasdataurl/index.md | 2 +- .../zh-cn/web/api/fragmentdirective/index.md | 2 +- .../api/htmlcanvaselement/todataurl/index.md | 6 +- files/zh-cn/web/api/window/atob/index.md | 2 +- files/zh-cn/web/api/window/btoa/index.md | 2 +- .../web/api/workerglobalscope/atob/index.md | 2 +- .../web/api/workerglobalscope/btoa/index.md | 2 +- .../web/css/_doublecolon_target-text/index.md | 4 +- files/zh-cn/web/html/element/a/index.md | 6 +- .../web/html/global_attributes/id/index.md | 6 +- .../identifying_resources_on_the_web/index.md | 108 ------------------ files/zh-cn/web/http/basics_of_http/index.md | 12 +- files/zh-cn/web/http/headers/alt-svc/index.md | 22 ++-- .../web/http/resources_and_uris/index.md | 21 ---- files/zh-cn/web/http/session/index.md | 4 +- .../index.md | 4 +- .../fragment}/text_fragments/index.md | 4 +- .../data_urls => uri/schemes/data}/index.md | 4 +- 23 files changed, 81 insertions(+), 220 deletions(-) delete mode 100644 files/zh-cn/web/http/basics_of_http/identifying_resources_on_the_web/index.md delete mode 100644 files/zh-cn/web/http/resources_and_uris/index.md rename files/zh-cn/web/{http/basics_of_http => uri/authority}/choosing_between_www_and_non-www_urls/index.md (97%) rename files/zh-cn/web/{ => uri/fragment}/text_fragments/index.md (99%) rename files/zh-cn/web/{http/basics_of_http/data_urls => uri/schemes/data}/index.md (98%) diff --git a/files/zh-cn/_redirects.txt b/files/zh-cn/_redirects.txt index 614b439ae517cf..e869965ccb9dc5 100644 --- a/files/zh-cn/_redirects.txt +++ b/files/zh-cn/_redirects.txt @@ -2423,9 +2423,11 @@ /zh-CN/docs/Web/HTML/动作 /zh-CN/docs/Glossary/Speculative_parsing /zh-CN/docs/Web/HTML/属性 /zh-CN/docs/Web/HTML/Attributes /zh-CN/docs/Web/HTTP/Access_control_CORS /zh-CN/docs/Web/HTTP/CORS -/zh-CN/docs/Web/HTTP/Basics_of_HTTP/Data_URIs /zh-CN/docs/Web/HTTP/Basics_of_HTTP/Data_URLs +/zh-CN/docs/Web/HTTP/Basics_of_HTTP/Choosing_between_www_and_non-www_URLs /zh-CN/docs/Web/URI/Authority/Choosing_between_www_and_non-www_URLs +/zh-CN/docs/Web/HTTP/Basics_of_HTTP/Data_URIs /zh-CN/docs/Web/URI/Schemes/data +/zh-CN/docs/Web/HTTP/Basics_of_HTTP/Data_URLs /zh-CN/docs/Web/URI/Schemes/data /zh-CN/docs/Web/HTTP/Basics_of_HTTP/MIME_types/Complete_list_of_MIME_types /zh-CN/docs/Web/HTTP/Basics_of_HTTP/MIME_types/Common_types -/zh-CN/docs/Web/HTTP/Basics_of_HTTP/选择_www_或非_www_URL_作为域名 /zh-CN/docs/Web/HTTP/Basics_of_HTTP/Choosing_between_www_and_non-www_URLs +/zh-CN/docs/Web/HTTP/Basics_of_HTTP/选择_www_或非_www_URL_作为域名 /zh-CN/docs/Web/URI/Authority/Choosing_between_www_and_non-www_URLs /zh-CN/docs/Web/HTTP/CORS/Errors/CORS错误允许凭证 /zh-CN/docs/Web/HTTP/CORS/Errors/CORSMIssingAllowCredentials /zh-CN/docs/Web/HTTP/Caching_FAQ /zh-CN/docs/Web/HTTP/Caching /zh-CN/docs/Web/HTTP/Content_negotiation/Accept_默认值 /zh-CN/docs/Web/HTTP/Content_negotiation/List_of_default_Accept_values @@ -2460,12 +2462,13 @@ /zh-CN/docs/Web/HTTP/Link_prefetching_FAQ /zh-CN/docs/Glossary/Prefetch /zh-CN/docs/Web/HTTP/Proxy_servers_and_tunneling/Proxy_Auto-Configuration_(PAC)_file /zh-CN/docs/Web/HTTP/Proxy_servers_and_tunneling/Proxy_Auto-Configuration_PAC_file /zh-CN/docs/Web/HTTP/Public_Key_Pinning /zh-CN/docs/Web/Security/Certificate_Transparency +/zh-CN/docs/Web/HTTP/Resources_and_URIs /zh-CN/docs/Web/HTTP/Basics_of_HTTP/MIME_types /zh-CN/docs/Web/HTTP/Response_codes /zh-CN/docs/Web/HTTP/Status /zh-CN/docs/Web/HTTP/Response_codes/100 /zh-CN/docs/Web/HTTP/Status/100 /zh-CN/docs/Web/HTTP/Response_codes/204 /zh-CN/docs/Web/HTTP/Status/204 /zh-CN/docs/Web/HTTP/Response_codes/501 /zh-CN/docs/Web/HTTP/Status/501 /zh-CN/docs/Web/HTTP/X-Frame-Options /zh-CN/docs/Web/HTTP/Headers/X-Frame-Options -/zh-CN/docs/Web/HTTP/data_URIs /zh-CN/docs/Web/HTTP/Basics_of_HTTP/Data_URLs +/zh-CN/docs/Web/HTTP/data_URIs /zh-CN/docs/Web/URI/Schemes/data /zh-CN/docs/Web/HTTP/消息 /zh-CN/docs/Web/HTTP/Messages /zh-CN/docs/Web/HTTP/策略特征 /zh-CN/docs/Web/HTTP/Permissions_Policy /zh-CN/docs/Web/HTTP/缓存_FAQ /zh-CN/docs/Web/HTTP/Caching @@ -2754,6 +2757,7 @@ /zh-CN/docs/Web/Security/Securing_your_site/Turning_off_form_autocompletion /zh-CN/docs/Web/Security/Practical_implementation_guides/Turning_off_form_autocompletion /zh-CN/docs/Web/Security/传输层安全协议 /zh-CN/docs/Web/Security/Transport_Layer_Security /zh-CN/docs/Web/Security/子资源完整性 /zh-CN/docs/Web/Security/Subresource_Integrity +/zh-CN/docs/Web/Text_fragments /zh-CN/docs/Web/URI/Fragment/Text_fragments /zh-CN/docs/Web/WEB_API_---js /zh-CN/docs/Web/API /zh-CN/docs/Web/WebGL /zh-CN/docs/Web/API/WebGL_API /zh-CN/docs/Web/WebGL/Adding_2D_content_to_a_WebGL_context /zh-CN/docs/Web/API/WebGL_API/Tutorial/Adding_2D_content_to_a_WebGL_context @@ -2792,7 +2796,7 @@ /zh-CN/docs/XPath-840092-dup /zh-CN/docs/Web/XPath /zh-CN/docs/XSLT /zh-CN/docs/Web/XSLT /zh-CN/docs/d_temp /zh-CN/docs/Web/API/Document -/zh-CN/docs/data_URIs /zh-CN/docs/Web/HTTP/Basics_of_HTTP/Data_URLs +/zh-CN/docs/data_URIs /zh-CN/docs/Web/URI/Schemes/data /zh-CN/docs/en /en-US/ /zh-CN/docs/keypress /zh-CN/docs/Web/API/Element/keypress_event /zh-CN/docs/learn/Accessibility/CSS和JavaScript /zh-CN/docs/Learn/Accessibility/CSS_and_JavaScript diff --git a/files/zh-cn/_wikihistory.json b/files/zh-cn/_wikihistory.json index 5a5cb7fd2679d1..7b682c372eb916 100644 --- a/files/zh-cn/_wikihistory.json +++ b/files/zh-cn/_wikihistory.json @@ -22387,30 +22387,6 @@ "cissoid" ] }, - "Web/HTTP/Basics_of_HTTP/Choosing_between_www_and_non-www_URLs": { - "modified": "2019-03-23T22:18:43.282Z", - "contributors": [ - "zqyue", - "Ende93", - "xgqfrms-GitHub", - "ziyunfei", - "chaos_zhang" - ] - }, - "Web/HTTP/Basics_of_HTTP/Data_URLs": { - "modified": "2020-10-15T21:06:54.948Z", - "contributors": [ - "leegent", - "2585479524", - "BobGreen", - "bramblex", - "tlos142857", - "Ende93", - "xgqfrms-GitHub", - "little-tomorrow", - "ziyunfei" - ] - }, "Web/HTTP/Basics_of_HTTP/Evolution_of_HTTP": { "modified": "2020-02-20T03:41:08.272Z", "contributors": [ @@ -22428,18 +22404,6 @@ "WeijieZhu" ] }, - "Web/HTTP/Basics_of_HTTP/Identifying_resources_on_the_Web": { - "modified": "2019-05-06T05:35:10.899Z", - "contributors": [ - "wolfzZ", - "heyv5", - "springapple", - "Wendy_Love", - "yuankunzhang", - "little-tomorrow", - "DreamerKing" - ] - }, "Web/HTTP/Basics_of_HTTP/MIME_types": { "modified": "2020-11-04T00:16:29.009Z", "contributors": [ @@ -23413,10 +23377,6 @@ "ZhongyiChen" ] }, - "Web/HTTP/Resources_and_URIs": { - "modified": "2019-09-05T00:27:21.660Z", - "contributors": ["ran"] - }, "Web/HTTP/Resources_and_specifications": { "modified": "2019-03-23T22:14:32.179Z", "contributors": ["ppphp", "shevacjs", "yuankunzhang"] @@ -32360,6 +32320,30 @@ "ziyunfei" ] }, + "Web/URI/Authority/Choosing_between_www_and_non-www_URLs": { + "modified": "2019-03-23T22:18:43.282Z", + "contributors": [ + "zqyue", + "Ende93", + "xgqfrms-GitHub", + "ziyunfei", + "chaos_zhang" + ] + }, + "Web/URI/Schemes/data": { + "modified": "2020-10-15T21:06:54.948Z", + "contributors": [ + "leegent", + "2585479524", + "BobGreen", + "bramblex", + "tlos142857", + "Ende93", + "xgqfrms-GitHub", + "little-tomorrow", + "ziyunfei" + ] + }, "Web/WebDriver": { "modified": "2020-10-15T22:20:19.059Z", "contributors": ["lvbaiying", "ZQ-jhon"] diff --git a/files/zh-cn/glossary/base64/index.md b/files/zh-cn/glossary/base64/index.md index 53b322e576b1e4..0d3c8e87928d99 100644 --- a/files/zh-cn/glossary/base64/index.md +++ b/files/zh-cn/glossary/base64/index.md @@ -15,13 +15,13 @@ l10n: ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/ ``` -一种常见的变体是“URL 安全的 Base64”,它省略了填充,并将 `+/` 替换为 `-_`,以避免在 {{glossary("URL")}} 路径段或查询参数中可能引起问题的字符的问题。如果不将数据放在路径段或查询参数中,你就不需要用到这一变体。例如,[data URL](/zh-CN/docs/Web/HTTP/Basics_of_HTTP/Data_URLs) 既没有路径段也没有查询参数,因此可以使用标准的 Base64 编码。 +一种常见的变体是“URL 安全的 Base64”,它省略了填充,并将 `+/` 替换为 `-_`,以避免在 {{glossary("URL")}} 路径段或查询参数中可能引起问题的字符的问题。如果不将数据放在路径段或查询参数中,你就不需要用到这一变体。例如,[data URL](/zh-CN/docs/Web/URI/Schemes/data) 既没有路径段也没有查询参数,因此可以使用标准的 Base64 编码。 Base64 编码方案通常用于对二进制数据进行编码,以便在只能处理 ASCII 文本(或某些 ASCII 的超集,仍不接受任意二进制数据)的媒体上进行存储或传输。这确保了数据在传输过程中保持不变。Base64 的常见应用包括: - 通过[多用途互联网邮件扩展](https://zh.wikipedia.org/wiki/多用途互聯網郵件擴展)发送电子邮件 - 在 [XML](/zh-CN/docs/Web/XML) 中存储复杂数据 -- 编码二进制数据以便包含在 [`data:` URL](/zh-CN/docs/Web/HTTP/Basics_of_HTTP/Data_URLs) 中 +- 编码二进制数据以便包含在 [`data:` URL](/zh-CN/docs/Web/URI/Schemes/data) 中 ## 编码后大小增加 @@ -97,6 +97,6 @@ await dataUrlToBytes("data:application/octet-stream;base64,AAEC"); // Uint8Array - JavaScript API: - {{domxref("Window.btoa()")}}(也在 {{domxref("WorkerGlobalScope.btoa()", "worker 中可用", "", 1)}}) - {{domxref("Window.atob()")}}(也在 {{domxref("WorkerGlobalScope.atob()", "worker 中可用", "", 1)}}) -- [Data URL](/zh-CN/docs/Web/HTTP/Basics_of_HTTP/Data_URLs) +- [Data URL](/zh-CN/docs/Web/URI/Schemes/data) - 维基百科上的 [Base64](https://zh.wikipedia.org/wiki/Base64) - [RFC 4648](https://datatracker.ietf.org/doc/html/rfc4648) 中对 Base64 算法的描述 diff --git a/files/zh-cn/learn/common_questions/web_mechanics/what_is_a_url/index.md b/files/zh-cn/learn/common_questions/web_mechanics/what_is_a_url/index.md index 0275ca3a237d42..6c8bb71659f0cc 100644 --- a/files/zh-cn/learn/common_questions/web_mechanics/what_is_a_url/index.md +++ b/files/zh-cn/learn/common_questions/web_mechanics/what_is_a_url/index.md @@ -109,7 +109,7 @@ URL 的第一部分是*方案*(scheme),它表示浏览器必须使用的 - 显示其他 HTML 文档,用 {{HTMLElement("iframe")}} 元素。 > [!NOTE] -> 当在页面中加载资源时指定 URL(例如使用 `