Link HTTP Header: Syntax, Directive, Examples

The Link HTTP Header entity-header field allows one or more links to be serialized in HTTP headers. It has the same semantics as the HTML link> element. The HTML element link> specifies relationships between the current document and an external resource. This element is most commonly used to link to stylesheets, but it is also used to create site icons (including “favicon” style icons and icons for the home screen and apps on mobile devices), among other things. There is only one value for using the Link HTTP Header. The value for using the Link HTTP Header is the <uri-references>. An example of the Link HTTP Header is written below.

Link: <https://www.facebook.com/>; rel="preconnect"

The Link HTTP Header Syntax, Directives and Uses example can be seen above.

To serialize one or more links in the HTTP headers, the Link HTTP Header field is used Allows a client interested in the requested resource to be referred to another resource that contains metadata. Like the HTML link> element, it has the same semantics.

The Link HTTP Header uses only one value. The syntax for using the Link HTTP Header is written below

Link: <uri-reference>; param1=value1; param2="value2"

As previously noted and further explained, this header only accepts one directive. There are options in the link header that are equal to the <link> element’s attributes, separated by a comma (,). The <uri-reference>is the URI reference, which must be contained in double quotes between and >. An example directive for using the Location HTTP Header is given below. 

Link: <https://example.com>; rel="preconnect"

The Link HTTP Header field is used to serialize one or more links in HTTP headers. It enables the server to direct a client who is interested in another resource that contains metadata about the requested resource. It has the same semantics as the HTML link> element.

This indicates that additional information about the requested resource is accessible at https:/facebook.com/.

Link: <https://www.facebook.com/>; rel="preconnect"

The URI must be contained in double quotes between < and >. As a result, this is an ineffective style of writing.

Link:https://www.facebook.com/; rel="preconnect"

Multiple links may be specified, separated by commas. An example is written below.

Link: <https://example.one.com>; rel="preconnect", 
<https://example.two.com>; rel="preconnect", 
<https://example.three.com>; rel="preconnect"

There is on following is the specification document of the Link HTTP Header. RFC 8288 section 3 Article 4.1 mentions the Link HTTP Header’s definition and uses. Additionally, it mentions that Link targets may need to be transformed to URIs before being expressed in serializations that do not allow IRIs. This includes the HTTP header field for the Link.  

The Link HTTP Header is a Request Header Type because it enables the server to direct a client interested in the requested resource to another resource that contains metadata about the requested resource.

There are other similar HTTP to the Link HTTP Header that are listed below. 

  • 103 Early Hints: The HTTP 103 Early Hints information response status code is primarily intended to be used in conjunction with the Link HTTP header to enable the user agent to begin preloading resources while the server is still preparing a response. It is similar to the Link HTTP header in that the entity-header field provides a means of serializing one or more links in HTTP headers.
  • <link>: The <link> HTML element establishes a connection between the current content and a remote resource. This element is most frequently used to connect to stylesheets, but it is also used to establish site icons (both “favicon”-style icons and icons for the home screen and apps on mobile devices).

There is no compatible browser for the Sec-CH-UA-Full-Version-List HTTP Header.

Holistic SEO
Follow SEO

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.