For serialising one or more links in HTTP headers, the HTTP Link header-field is used. It allows the server to point an interested client to another resource containing metadata about the requested resource. It is semantically equivalent to the HTML <link> element.
Link: <uri-reference>; param1="value1" param2="value2"
Directive: This header accept a single directive as mentioned above and described below. The link header contains parameters, which are separated with ; and are equivalent to attributes of the <link> element.
- <uri-reference>: The URI reference, must be enclosed between < and >.
- This means that more information about the requested resource is available in the resource whose relative URI is https://www.geeksforgeeks.org/.
Link: <https://www.geeksforgeeks.org/>; rel="preconnect"
- The URI must be enclosed between < and >. So, this is not a good way to write.
Specifying multiple links: You can specify multiple links separated by commas.
Link: <https://example.one.com>; rel="preconnect", <https://example.two.com>; rel="preconnect", <https://example.three.com>; rel="preconnect"
Typical uses are:
- A map of different language, content-type and version-specific URIs
- Licensing, such as Creative Commons
- Information about how to edit the file
- Policy information about appropriate use and/or distribution of the data
Supported Browsers: The browser supported by HTTP-header link are unknown till now.
- HTTP headers | Access-Control-Expose-Headers
- HTTP headers | Access-Control-Allow-Headers.
- HTTP headers | Access-Control-Request-Headers
- Difference between Hard link and Soft link
- HTTP headers | Location
- HTTP headers | User-Agent
- HTTP headers | Save-Data
- HTTP headers | Content-Type
- HTTP headers | X-Forwarded-Proto
- HTTP headers | X-XSS-Protection
- HTTP headers | X-Frame-Options
- HTTP headers | Last-Modified
- HTTP headers | Date
- HTTP headers | Cookie
- HTTP headers | Strict-Transport-Security
- HTTP headers | Expect
- HTTP headers | Accept-Encoding
- HTTP headers | Proxy-Authenticate
- HTTP headers | Content-Range
- HTTP headers | Content-Encoding
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to email@example.com. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.