Link
O cabeçalho de entidade Link
provém maneiras para serializar um ou mais links em cabeçalhos HTTP. Ele é semanticamente equivalente ao elemento HTML <link>
.
Sintaxe
Link: < uri-reference >; param1=value1; param2="value2"
<uri-reference>
-
A referência da URI, precisa ser encapsulado entre
<
e>
.
Parâmetros
O cabeçalho link contém parâmetros, os quais são separados com ;
e são equivalentes aos atributos do elemento <link>
.
Exemplos
A URI precisa ser encapsulado entre <
e >
:
http
Link: <https://example.com>; rel="preconnect"
http
Link: https://bad.example; rel="preconnect"
Especificando múltiplos links
Você pode especificar múltiplos links separados por vírgulas, por exemplo:
Link: <https://one.example.com>; rel="preconnect", <https://two.example.com>; rel="preconnect", <https://three.example.com>; rel="preconnect"
Especificações
Especificação | Status | Comentários |
---|---|---|
RFC 8288, sessão 3: Link Serialisation in HTTP Headers | IETF RFC | |
RFC 5988, sessão 5: The Link Header Field | IETF RFC | Definição inicial |
Compatibilidade com navegadores
Report problems with this compatibility data on GitHubdesktop | mobile | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
Link | ||||||||||||
blocking | ||||||||||||
rel=expect | ||||||||||||
fetchpriority |
Legend
Tip: you can click/tap on a cell for more information.
- Full support
- Full support
- No support
- No support
- Experimental. Expect behavior to change in the future.
- See implementation notes.
The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.