Link - HTTP 编辑
The HTTP Link
entity-header field provides a means for serialising one or more links in HTTP headers. It is semantically equivalent to the HTML <link>
element.
Syntax
Link: < uri-reference >; param1=value1; param2="value2"
<uri-reference>
- The URI reference, must be enclosed between
<
and>
.
Parameters
The link header contains parameters, which are separated with ;
and are equivalent to attributes of the <link>
element.
Examples
The URI (absolute or relative) must be enclosed between <
and >
:
Link: <https://example.com>; rel="preconnect"
Link: https://bad.example; rel="preconnect"
Specifying multiple links
You can specify multiple links separated by commas, for example:
Link: <https://one.example.com>; rel="preconnect", <https://two.example.com>; rel="preconnect", <https://three.example.com>; rel="preconnect"
Specifications
Specification | Status | Comments |
---|---|---|
RFC 8288, section 3: Link Serialisation in HTTP Headers | IETF RFC | |
RFC 5988, section 5: The Link Header Field | IETF RFC | Initial definition |
See also
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论