From 4062cfb18880e12a6f892d794114c9c2f062a290 Mon Sep 17 00:00:00 2001 From: "Michael[tm] Smith" Date: Mon, 19 Apr 2021 13:01:15 +0900 Subject: [PATCH] Clean up documentation about Alt-Svc HTTP header (#4159) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Clean up documentation about Alt-Svc HTTP header Some content had been added that described the Alt-Svc header as having the purpose of “separating the identity and location of a resource”. But that’s a misleading description — because what the Alt-Svc header is really about is, allowing a server to indicate that a particular resource should be loaded from a different server — while still appearing to the user as if were loaded from the same server. See https://www.mnot.net/blog/2016/03/09/alt-svc for a great overview. So this change: * Replaces the summary in the Alt-Svc article itself, while adding a See Also link to that https://www.mnot.net/blog/2016/03/09/alt-svc article. * Rewrites the description of Alt-Svc in the “Basics of HTTP” article. * Removes mention of Alt-Svc from the “Identifying resources on the Web” article. That article is entirely about URLs and their constituent parts; e.g., their path parts. Alt-Svc is not about URLs — it is about origins (host/protocol/port) and has nothing do with, e.g., path parts. So Alt-Svc doesn’t belong there; it’s a non sequitur there. * Removes mention of Alt-Svc from the “Resources and URIs” article, for reasons similar to the reasons for removing it from the “Identifying resources on the Web” article. Fixes https://github.com/mdn/content/issues/4125 * Drop Alt-Svc link form “Basics of HTTP” doc --- .../identifying_resources_on_the_web/index.html | 2 -- files/en-us/web/http/basics_of_http/index.html | 2 -- files/en-us/web/http/headers/alt-svc/index.html | 8 ++------ files/en-us/web/http/resources_and_uris/index.html | 2 -- 4 files changed, 2 insertions(+), 12 deletions(-) diff --git a/files/en-us/web/http/basics_of_http/identifying_resources_on_the_web/index.html b/files/en-us/web/http/basics_of_http/identifying_resources_on_the_web/index.html index 6ee5ced4478666b..23bd3848d55b2c3 100644 --- a/files/en-us/web/http/basics_of_http/identifying_resources_on_the_web/index.html +++ b/files/en-us/web/http/basics_of_http/identifying_resources_on_the_web/index.html @@ -20,8 +20,6 @@

The target of an HTTP request is called a "resource", whose nature isn't defined further; it can be a document, a photo, or anything else. Each resource is identified by a Uniform Resource Identifier ({{Glossary("URI")}}) used throughout HTTP for identifying resources.

-

The identity and the location of resources on the Web are mostly given by a single URL (Uniform Resource Locator, a kind of URI). There are sometimes reasons identity and location are not given by the same URI: HTTP uses a specific HTTP header, {{HTTPHeader("Alt-Svc")}} when the resource requested wants the client to access it at another location.

-

URLs and URNs

URLs

diff --git a/files/en-us/web/http/basics_of_http/index.html b/files/en-us/web/http/basics_of_http/index.html index 2053e3a21cf88e7..5df8ff46f459c12 100644 --- a/files/en-us/web/http/basics_of_http/index.html +++ b/files/en-us/web/http/basics_of_http/index.html @@ -25,8 +25,6 @@

Articles

A specific kind of URI that directly embeds the resource it represents. Data URIs are very convenient, but have some caveats.
Resource URLs {{Non-standard_Inline}}
Resource URLs, those prefixed with the resource scheme are used by Firefox and Firefox browser extensions to load resources internally, but is also available to some sites the browser connects to as well.
-
Separating identity and location of a resource: The Alt-Svc HTTP header
-
Most of the time the identity and location of a web resource are shared, this can be changed with the {{HTTPHeader("Alt-Svc")}} header.
MIME types
Since HTTP/1.0, different types of content can be transmitted. This article explains how this is accomplished using the {{HTTPHeader("Content-Type")}} header and the MIME standard.
Choosing between www and non-www URLs
diff --git a/files/en-us/web/http/headers/alt-svc/index.html b/files/en-us/web/http/headers/alt-svc/index.html index 95467ebaf60dede..4b9fb3c5711346d 100644 --- a/files/en-us/web/http/headers/alt-svc/index.html +++ b/files/en-us/web/http/headers/alt-svc/index.html @@ -9,9 +9,7 @@ ---
{{HTTPSidebar}}
-

The Alt-Svc HTTP response - header is used to advertise alternative services through which the same resource can be - reached. An alternative service is defined by a protocol/host/port combination.

+

The {{HTTPHeader("Alt-Svc")}} HTTP header allows a server to indicate that a particular resource should be loaded from a different server — while still appearing to the user as if were loaded from the same server.

Syntax

@@ -84,7 +82,5 @@

Browser compatibility

See also

diff --git a/files/en-us/web/http/resources_and_uris/index.html b/files/en-us/web/http/resources_and_uris/index.html index 761c84d922d430b..6f9ecb64545351a 100644 --- a/files/en-us/web/http/resources_and_uris/index.html +++ b/files/en-us/web/http/resources_and_uris/index.html @@ -27,6 +27,4 @@
MIME media types define what kind of document a specific resource is. This article presents both the syntax and the most useful MIME types for use on the Web.
Common MIME types
List of common MIME types useful for Web developers.
-
Separating identity and location of a resource: the Alt-Svc header
-
Even if identity and location are both described using a {{Glossary("URL")}}, they are two different concepts and it is useful sometimes to distinguished between them. This article introduces the {{HTTPHeader("Alt-Svc")}} header.